From: Tomasz on 6 Jun 2010 03:13 Hi i have a problem how to solve that equation in matlab: d^2x/dt^2+2/t dx/dt=0 the initial state is: x(0)=0.005 dx/dt(0)=0 i put the variable z z=dx/dt and my equation is in form dz/dt+2/t * z=0 and now is my problem how to solve it with ode45 ??? thx for any help
From: Roger Stafford on 6 Jun 2010 04:31 "Tomasz " <skorpionxx(a)tlen.pl> wrote in message <hufhq0$qgl$1(a)fred.mathworks.com>... > ....... > i have a problem how to solve that equation in matlab: > > d^2x/dt^2+2/t dx/dt=0 > > the initial state is: > x(0)=0.005 > dx/dt(0)=0 > ....... Using calculus the general solution to your differential equation is x(t) = k1/t^2 + k2 where k1 and k2 are any constants. The only way for this to fit your initial conditions is to have k1 = 0 and k2 = .005, which would make x a constant 0.005 . I suspect ode45 will have a difficult time with this at the beginning, however, because it will then be faced with a zero-divided-by-zero situation in computing the initial 2/t*z value. I have no idea whether it can successfully maintain an x output at a constant 0.005, as it theoretically should. You are asking a lot of ode45. My question is, why would you want to use matlab to solve such an elementary problem? It is intended for solving problems that are beyond the scope of elementary calculus. Roger Stafford
From: Tomasz on 6 Jun 2010 05:06 > My question is, why would you want to use matlab to solve such an elementary problem? It is intended for solving problems that are beyond the scope of elementary calculus. > > Roger Stafford Yes, i want use matlab to solve that problem and don't know how to implement it in matlab
|
Pages: 1 Prev: Plotting copula density contour Next: How to print some text in my plot? |