Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Pag Max
Posts:
13
Registered:
5/16/11


Re: ordinary differential equations
Posted:
Jan 24, 2012 4:45 AM


Got it.. This makes lot of sense.. Thank you so much...
"Roger Stafford" wrote in message <jflnva$mru$1@newscl01ah.mathworks.com>... > "Pag Max" wrote in message <jfldla$nh4$1@newscl01ah.mathworks.com>... > > Thanks Roger, > > No f and g are not inverse of each other but I realize I can reframe my problem > > as > > x2_dd=inv_f (x1_dd) > > and > > x1_dd=inv_g(x2_dd), > > > > This was confusing me but I guess you are right, ode is probably not appropriate. What about ode15i as Torsten suggested. Can this be treated as implicit ode. >          > With 'f' and 'g' not inverses of each other, I'll give you an example to illustrate why it would be inappropriate to use any matlab 'ode' function to solve your problem. > > Suppose your differential equations are: > > dx/dt = f(dy/dt) = (dy/dt)^(1/3) > dy/dt = g(dx/dt) = 1/(1+(dx/dt)^2) > x(0) = 0 > y(0) = 0 > > The solution to the first two equations can be found using 'roots'. Call dx/dt = u and dy/dt = v. We have > > v = 1/(1+u^2) > u = v^(1/3) > v = u^3 > u^3 = 1/(1+u^2) > u^5+u^31 = 0 > u = roots([1,0,1,0,0,1]) > Only one root is real: > dx/dt = u = .83761977482696 > dy/dt = v = u^3 = 1/(1+u^2) = .58767980285774 > > These derivatives are both constant as t varies. Hence we can immediately conclude that > > x(t) = .83761977482696 * t > y(t) = .58767980285774 * t > > without any reference to an 'ode' function. It would be absurd to use it for that purpose. > > The above is characteristic of all cases where 'f' and 'g' are not inverses of one another except that in some cases there may be more than one pair of roots to them, in which case the problem becomes indeterminate as to which pair is going to apply. In any case 'ode' remains entirely unneeded for a problem of this simplistic nature. > > Roger Stafford



