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:
ode45

Subject: ode45

From: statira

Date: 4 Dec, 2011 15:28:08

Message: 1 of 3

Hi everybody

My question is simple. How can I solve the system of differential equations like these?

y"=f(y,y',x,x',x")
x"=g(x,x',y,y',y")

Can Ode45i solve equations like these? Haw?

Subject: ode45

From: statira

Date: 4 Dec, 2011 16:23:09

Message: 2 of 3

"statira" wrote in message <jbg3i8$33b$1@newscl01ah.mathworks.com>...
> Hi everybody
>
> My question is simple. How can I solve the system of differential equations like these?
>
> y"=f(y,y',x,x',x")
> x"=g(x,x',y,y',y")
>
> Can Ode45i solve equations like these? Haw?

My equations are:
(y'+1)*x''-x'*y''+x+y-2=0
y''*x+(3-y)*x''+4*y'+8=0

thanks.

Subject: ode45

From: Roger Stafford

Date: 4 Dec, 2011 20:43:08

Message: 3 of 3

"statira" wrote in message <jbg6pc$bu0$1@newscl01ah.mathworks.com>...
> "statira" wrote in message <jbg3i8$33b$1@newscl01ah.mathworks.com>...
> > My question is simple. How can I solve the system of differential equations like these?
> >
> > y"=f(y,y',x,x',x")
> > x"=g(x,x',y,y',y")
> >
> > Can Ode45i solve equations like these? Haw?
>
> My equations are:
> (y'+1)*x''-x'*y''+x+y-2=0
> y''*x+(3-y)*x''+4*y'+8=0
- - - - - - -
  If you let z(1) = x, z(2) = x', z(3) = y, and z(4) = y', just use the four implicit equations for ode45i:

 z(4)' - f(z(3),z(4),z(1),z(2),z(2)') = 0
 z(2)' - g(z(1),z(2),z(3),z(4),z(4)') = 0
 z(1)' - z(2) = 0
 z(3)' - z(4) = 0

  However, I don't see why you need to bother with ode45i when it is so easy to explicitly solve for x'' and y'' in terms of the lower derivatives as shown in your second post. It is after all linear in x'' and y''. Then you could use ode45 instead.

Roger Stafford

Tags for this Thread

No tags are associated with 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