Student Support Forum: 'Help Solving a Differential Equation' topicStudent Support Forum > General > "Help Solving a Differential Equation"

 < Previous Comment Help | Reply To Comment | Reply To Topic
 Author Comment/Response Bill Simpson 06/02/12 10:23am I tend to think that not mixing x1= and x1[t] will be a good thing. If something is a function of t then consistently define it as a function of t. Likewise for x2, y2, etc. For your example I think getting rid of the decimal points and using rationals may help you. It will certainly get rid of some things like 3.+0.*I in your calculations. Separating expressions with a newline instead of a semicolon sometimes works fine, but that has been a longstanding source of incomprehensible odd results and I really recommend against that. Trying to reformulate your problem into something that is more like the examples shown for DSolve, rather than the freeflowing mathematical prose that you expect Mathematica should understand, may prove helpful. Trying to solve for th''[t] that includes a completely unknown and unspecified phi[t] and its derivatives worries me. Giving Solve differential equations can be done, anything can be given to anything in Mathematica, it just depends on whether the result makes any sense. It does not appear that Solve understands that it is given a differential equation and just thinks it has been given an ordinary equation with funny names. Asking DSolve to solve for a second derivative is not what is usually seen. This at least seems to get rid of some of the errors, but I don't know if it will ever finish. In[1]:= Mla=Mem=Msm=Mua = 2; L1 = L2 = 1/2; L3 = 1/4; Iua = Ila = (1/12)*Mua*1/4; g =98/10; m1 = Mla + Mem; m2 = Mua + Msm; x1[t_] := L2 * Cos[th[t]] + L1 * Cos[th[t] + phi[t]]; ax1[t_] := D[D[x1[t],t],t]; y1[t_] := L2 * Sin[th[t]] + L1 * Sin[th[t] + phi[t]]; ay1[t_] := D[D[y1[t],t],t]; x2[t_] := L3*Cos[th[t]]; y2[t_] := L3 * Sin[th[t]]; ax2[t_] := D[D[x2[t],t],t]; ay2[t_] := D[D[y2[t],t],t]; fx1[t_] := m1*ax1[t]; fy1[t_] := m1*ay1[t]+Mem*g+Mla*g; fx2[t_] := m2*ax2[t] +fx1[t]; fy2[t_] := m2*ay2[t]+fy1[t]+Msm g + Mua g; tau1[t_] := 1/5*t -1/10*Sin[Pi*t]; tau2[t_] := 1 - 1/10 *Cos[Pi*t]; (*Here we begin trying to solve for the angular accelerations*) ath[t_]:=(tau1[t] +fx1[t]*(L2-L3)*Sin[th[t]]-fy1[t]*(L2-L3)*Cos[th[t]]+ fx2[t]*L3*Sin[th[t]]-fy2[t]*L3*Cos[th[t]]+L3*Msm*g*Cos[th[t]]-tau2[t])/Iua; FullSimplify[ath[t]] Out[23]= (6*(-20 + 4*t + 2*Cos[Pi*t] - 490*Cos[th[t]] - 2*Sin[Pi*t] + 20*Sin[phi[t]]* (phi'[t] + th'[t])^2 - 25*th''[t] - 20*Cos[phi[t]]* phi''[t] + th''[t])))/5 In[24]:= DSolve[ath[t]==th''[t], th[t],t] Out[24]= \$Aborted URL: ,

 Subject (listing for 'Help Solving a Differential Equation') Author Date Posted Help Solving a Differential Equation Derek 05/31/12 4:15pm Re: Help Solving a Differential Equation Michael 06/01/12 7:21pm Re: Help Solving a Differential Equation Bill Simpson 06/02/12 10:23am
 < Previous Comment Help | Reply To Comment | Reply To Topic