Hey, I am conducting a frequency analysis on a system of coupled, second order differential equations. I have come up with this code, but I know that it does not solve my system correctly. With a initial condition of (only) y(0) = 0.2, I know from both physical experimentation and from intuition just from looking at the maths, that both of the systems should oscillate and interact with each other. This is not what is seen here, the y graph clearly shows a purely sinusoidal motion, while the other shows the beating behaviour I am looking for. From this, I know that desolve is not solving my problem correctly.
I have seen posts about solving second order DEs with ode45 but I have no idea what is going on, I don't understand the code at all. So my question is, how could I adapt my code to use ode45 to obtain a solution to these two coupled second order differential equations? Would the fourier() function still work, or would I use fft() when I have obtained numerical data?
I = 5.59*10^-3 + 0.032*4*0.155^2;
odes = [diff(y,2) == (-k/m)*y + (w/m)*z; diff(z,2) == (-J/I)*z + (w/I)*y];
conds = [cond1 cond2 cond3 cond4];
qwe = dsolve(odes, conds);
wilberforce_y = simplify(qwe.y, 500)
wilberforce_z = simplify(qwe.z, 500)
fplot(wilberforce_y, [0 50])
fplot(wilberforce_z, [0 50])