Path: news.mathworks.com!newsfeed-00.mathworks.com!solaris.cc.vt.edu!news.vt.edu!news.glorb.com!postnews.google.com!1g2000yqv.googlegroups.com!not-for-mail
From: TideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Solving system of ODEs
Date: Sun, 29 Jan 2012 12:34:19 -0800 (PST)
Organization: http://groups.google.com
Lines: 49
Message-ID: <f70bc1a9-d167-46e4-9b7b-b54afbdfa2d1@1g2000yqv.googlegroups.com>
References: <jg39m2$m4$1@newscl01ah.mathworks.com> <jg49v6$2ug$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1327869653 14078 127.0.0.1 (29 Jan 2012 20:40:53 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 29 Jan 2012 20:40:53 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 1g2000yqv.googlegroups.com; posting-host=202.78.152.105; posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HUALESRCNK
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1,gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:756101

On Jan 30, 9:25 am, "Bruno Luong" <b.lu...@fogale.findmycountry>
wrote:
> "Apon Mohaimen" wrote in message <jg39m2$m...@newscl01ah.mathworks.com>...
> > Dear all,
> > I was just wondering if anyone knows how to solve a system of ODE's of the following form:
> > dx/dt=f(x)
> > dy/dt=g(x)
> > x0=0,y0=0
> > note that both x' and y' prime are only functions of x only.
> > Do i need to include '0*h(y)' in one of the equations so that Matlab understands that it needs to solve for both x and y?
>
> I don't agree with Tideman, there is no partial derivative here. I propose two ways of solving the problem:
>
> 1. 1st Option
>
> Let's define
>
> X = [x; y]
> H(X) = [f(x); g(x)];
> X0 = [x0; y0];
>
> Then solve
> dX/dt = H(X)
> X(t=0) = X0
>
> using Matlab ode solver.
>
> 2nd option:
>
> Because x does not depend on y. Solve for x the system:
> dx/dt=f(x)
> x(t=0) = x0=0
>
> using MATLAB ode solver.
>
> Then compute y as integral:
>
> y(t) = y0 + integral_on (0,t) (g(x(s)) ds.
>
> Using numerical integration.
>
> Bruno

But if y(x,t), then:
dy/dt=pdy/pdt + dx/dt pdy/pdx   where pd=> partial derivative