hi there,
I'm trying to plot a graph of against with the following equations of motion:
I've tried dsolve and ode45 yet there always seems to be some problems. I think ode45 might work better because apparently it would be easier to plot the graph by using some numerical method?
Here's my failed attempt to solve it: (I just set some variables to be 1 to make the problem easier here)
syms theta(t) phi(t) psi(t) Cdtheta = diff(theta , t);d2theta = diff(theta , t , 2);dphi = diff(phi , t);%dpsi = diff(psi , t);
%alpha = C * (dpsi + dphi * cos(theta));
%beta = alpha * cos(theta) + dphi * (sin(theta))^2;
alpha = 1;beta = 1;dpsi = 1;eqn1 = dphi == (beta - alpha * cos(theta)) / (sin(theta))^2 ; %equations of motion
eqn2 = d2theta == (dphi*(dphi * cos(theta) - alpha)+1)*sin(theta) ; %equations of motioneqns = [eqn1 , eqn2];%cond = [dpsi == 1];
[thetaSol(t) phiSol(t)] = dsolve(eqns)
Thanks a lot for your help and time in advance!
Cheers,
Jane
Best Answer