Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Solving differential equations in four Variables

Subject: Solving differential equations in four Variables

From: Sridatta Pasumarthy

Date: 17 Nov, 2010 00:16:04

Message: 1 of 3

how do i solve four complicated differential equations which have four variables? is ode23 the best possible operator i could be use?

equations are -

dw/dt = f(z) * dy/dt
w * dx/dt = g(z) * dy/dt
w * dy/dt = f(z) + g(z) * dx/dt + j(z) * dz/dt
w * dz/dt = j(z) * dy/dt

initial conditions are -
x(0)=0, y(0)=0, z(0)=0, dx/dt(0)=0, dy/dt(0)=0, dz/dt(0)=v

so as you see all four of them are interconnected and i need to plot the variation of 'dw/dz' vs 'z' at the end of the problem? i have been trying for some time and unable to find an answer....

Subject: Solving differential equations in four Variables

From: Roger Stafford

Date: 17 Nov, 2010 01:51:04

Message: 2 of 3

"Sridatta Pasumarthy" <sridatta1988@gmail.com> wrote in message <ibv6s4$1k1$1@fred.mathworks.com>...
> how do i solve four complicated differential equations which have four variables? is ode23 the best possible operator i could be use?
>
> equations are -
>
> dw/dt = f(z) * dy/dt
> w * dx/dt = g(z) * dy/dt
> w * dy/dt = f(z) + g(z) * dx/dt + j(z) * dz/dt
> w * dz/dt = j(z) * dy/dt
>
> initial conditions are -
> x(0)=0, y(0)=0, z(0)=0, dx/dt(0)=0, dy/dt(0)=0, dz/dt(0)=v
>
> so as you see all four of them are interconnected and i need to plot the variation of 'dw/dz' vs 'z' at the end of the problem? i have been trying for some time and unable to find an answer....
- - - - - - - - - -
  Fortunately these equations are linear in the four derivatives, so you can find explicit expressions for each of the derivatives in terms of non-derivatives. According to my symbolic 'solve' these turn out to be:

 dx/dt = f(z)*g(z)/(w(z)^2-g(z)^2-j(z)^2)
 dy/dt = f(z)*w(z)/(w(z)^2-g(z)^2-j(z)^2)
 dz/dt = f(z)*j(z)/(w(z)^2-g(z)^2-j(z)^2)
 dw/dt = f(z)^2*w(z)/(w(z)^2-g(z)^2-j(z)^2)

These are in the form required by the 'ode' solvers.

  I am puzzled by your initial conditions. If dz/dt(0) = v is nonzero, that would require that both f(0) and j(0) be nonzero. In turn dy/dt(0) = 0 would then imply that w(0) = 0. If w(0) is zero, then dw/dt(0) would also be zero. That means if I am not mistaken that w(t) would remain at a constant zero value, and in turn so would y(t).

Roger Stafford

Subject: Solving differential equations in four Variables

From: Sridatta Pasumarthy

Date: 18 Nov, 2010 01:34:04

Message: 3 of 3

WOW!! many thanks for replying...i will look into the initial conditions and see if they would pose a problem...

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ibvce8$pr1$1@fred.mathworks.com>...
> "Sridatta Pasumarthy" <sridatta1988@gmail.com> wrote in message <ibv6s4$1k1$1@fred.mathworks.com>...
> > how do i solve four complicated differential equations which have four variables? is ode23 the best possible operator i could be use?
> >
> > equations are -
> >
> > dw/dt = f(z) * dy/dt
> > w * dx/dt = g(z) * dy/dt
> > w * dy/dt = f(z) + g(z) * dx/dt + j(z) * dz/dt
> > w * dz/dt = j(z) * dy/dt
> >
> > initial conditions are -
> > x(0)=0, y(0)=0, z(0)=0, dx/dt(0)=0, dy/dt(0)=0, dz/dt(0)=v
> >
> > so as you see all four of them are interconnected and i need to plot the variation of 'dw/dz' vs 'z' at the end of the problem? i have been trying for some time and unable to find an answer....
> - - - - - - - - - -
> Fortunately these equations are linear in the four derivatives, so you can find explicit expressions for each of the derivatives in terms of non-derivatives. According to my symbolic 'solve' these turn out to be:
>
> dx/dt = f(z)*g(z)/(w(z)^2-g(z)^2-j(z)^2)
> dy/dt = f(z)*w(z)/(w(z)^2-g(z)^2-j(z)^2)
> dz/dt = f(z)*j(z)/(w(z)^2-g(z)^2-j(z)^2)
> dw/dt = f(z)^2*w(z)/(w(z)^2-g(z)^2-j(z)^2)
>
> These are in the form required by the 'ode' solvers.
>
> I am puzzled by your initial conditions. If dz/dt(0) = v is nonzero, that would require that both f(0) and j(0) be nonzero. In turn dy/dt(0) = 0 would then imply that w(0) = 0. If w(0) is zero, then dw/dt(0) would also be zero. That means if I am not mistaken that w(t) would remain at a constant zero value, and in turn so would y(t).
>
> Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us