0
|
3131 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Coupled ODE equation solving

Posted 10 years ago
 I have two differential equations, ?'[t] = l/(m r[t]^(2)) m r''[t]^(2) - l^(2)/(m r[t]^(3)) + k/(r[t]^(2))=0 that I want to solve and plot for r and ?. I want to let ?'=1, ? =0, r'=0, r=1, m=1, k=1, and l=1 that when plotted is a circle. How can I do that? Thanks in advance.Sean
2 Replies
Sort By:
Posted 10 years ago
 You have an equation for theta, which is first order, but you are giving 2 initial conditions for it. This is wrong. In addition, the equation for r(t) does not depend on theta(t). So all what you have to do is solve first for r(t), then simply use the solution obtained, and plug that in the ODE for theta(t), and solve for theta(t). There is no reason to solve them both at the same time. There is no coupling here.Just to make I am reading what you actually wrote (since this editor  sometimes acts strange), here is a screen shot of what I am seeing now Posted 10 years ago
 DSolve doesn't seem to want to do this, but NDSolve can do this. In:= m = 1; k = 1; l = 1; sol = NDSolve[{\[CapitalTheta]'[t] == l/(m r[t]^2),  m r''[t]^2 - l^2/(m r[t]^3) + k/(r[t]^2) == 0,  \[CapitalTheta] == 0, r == 1, r' == 0},  {\[CapitalTheta][t], r[t]}, {t, 0, 10}]  Out={{\[CapitalTheta][t]->InterpolatingFunction[{{0.,10.}},<>][t],r[t]->InterpolatingFunction[{{0.,10.}},<>][t]}, {\[CapitalTheta][t] -> InterpolatingFunction[{{0.,10.}},<>][t],r[t] -> InterpolatingFunction[{{0.,10.}},<>][t]}} In:= Plot[{\[CapitalTheta][t], r[t]} /. sol[], {t, 0, 10}]<<>>In:= ParametricPlot[{\[CapitalTheta][t], r[t]} /. sol[], {t, 0, 10}]<<>>But neither sol[] nor sol[] seem to show the circle that you describe. Is there perhaps some error in this?Edit: I think this is what I should have understood to write.In:= ParametricPlot[{r[t]Sin[\[CapitalTheta][t]],r[t]Cos[\[CapitalTheta][t]]}/.sol[],{t,0,10}]Note: Hopefully I haven't introduced any errors by having to manually type in the contents of that second code box, because apparently the forum software makes it impossible to paste into a second code box. Or at least that is what appeared to have happened repeatedly for me.It also seems surprising that DSolve cannot find a solution r=1, theta=t to the system of equations, with or without taking the liberty of multiplying both sides of both equations by an appropriate power of r to clear the denominators.