Find the formula for the general solution to the harmonic oscillator that is gov
ID: 3579737 • Letter: F
Question
Find the formula for the general solution to the harmonic oscillator that is governed by the equation d2x/dt2 = (-1/6)x (k = 1 and m= 6)
USE MATLAB code
(b) Find the solution that satisfies the conditions x(0) = 4.1 and x' (0) = 6.5
Create a plot of the solution. Notice the slope of the curve at t = 0 ... it should be 6.5.
(c) Use Manipulate to plot the solution to the differential equation in (a) with a damping term added. If c is the damping constant, determine the smallest value of c for which the solution never becomes negative.
Explanation / Answer
slopes.m
function dxdt = slopes(t, x)
dxdt = [x(2); -1*x(1)/6];
script.m
[t x] = ode23(@slopes, [0 10], [4.1; 6.5]);
plot(t, x(:,1));
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.