Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If you haven't already, finish the problem we started in class on the Simple Harmonic Oscillator. In particular, modify your 2 nd - order and

If you haven't already, finish the problem we started in class on the Simple Harmonic Oscillator. In particular, modify your 2nd-order and 4th-order Runge-Kutta functions to accept a system of equations (in matrix form, similar to the example program on Canvas). Then use both functions to solve the equation of motion for the simple harmonic oscillator:
d2xdt2=-2x
(a) The exact solution of the position of the simple harmonic oscillator is
x=Acos(t)+Bsin(t).
Solve for the coefficients A and B by hand, assuming )=(0s and )=(0s.
(b) Make a single figure (with four sub-panels) showing the exact and numerical solutions for the following conditions using both your 2nd-order and 4th-order Runge-Kutta functions. (Each plot should have three lines.)
i.=0.1,v0=1.0,x0=0,h=1
ii.=0.1,v0=1.0,x0=0,h=5
iii. =0.1,v0=1.0,x0=0,h=10
iv.=0.1,v0=1.0,x0=0,h=50
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions