Python: We want to find the position, as a function of time, of a damped harmonic oscillator. The equation of motion is
m d2x/dt2 = -kx – b dx/dt, x(0) = 0.5, dx/dt (0) = 0
Take m = 0.25 kg, k = 100 N/m, and b = 0.1 N.s/m.
Solve x(t) for t in the interval [0, 10T], where T = 2π/ω, and ω2 = k/m.
please write the code.
Divide the interval into N = 104 intervals: ti = i*h, I = 0, 1, 2, …, N, where h = 10T/N.
for the given situation x(0) = not zero we choose cosine and rejected sine
Get Answers For Free
Most questions answered within 1 hours.