MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NDSolve with implicit function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65891] Re: [mg65876] NDSolve with implicit function
  • From: "Carl K. Woll" <carlw at wolfram.com>
  • Date: Fri, 21 Apr 2006 01:33:28 -0400 (EDT)
  • References: <200604200915.FAA05354@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

rondeau at uvic.ca wrote:
> I am trying to numerically solve a differential equation
> {x'[t]==f[x[t],y[t]], x[0]=a} , where y[t] is the numerical solution to an
> implicit function g[x[t],y[t]]==0 (not a polynomial).
> 
> In other words, given x[t], we should be able to numerically compute y[t]
> from the implicit function and it would enter numerically into the function
> f of NDSolve.
> 
> Anyone with an idea on how to do this?
> 
> Thanks.
> Daniel  

It looks like you are trying to solve a DAE equation. Here is an example:

f[a_,b_]:=Cos[a b]
g[a_,b_]:=Erf[a]+Sin[b]+a b

NDSolve[{x'[t]==f[x[t],y[t]],g[x[t],y[t]]==0,x[0]==1},{x,y},{t,0,1}]

In[14]:=
NDSolve[{Derivative[1][x][t] == f[x[t], y[t]], g[x[t], y[t]] == 0, x[0] 
== 1}, {x, y}, {t, 0, 1}]

Out[14]=
{{x -> InterpolatingFunction[{{0., 1.}}, <>], y -> 
InterpolatingFunction[{{0., 1.}}, <>]}}

Carl Woll
Wolfram Research


  • Prev by Date: Re: NDSolve with implicit function
  • Next by Date: Re: command line question
  • Previous by thread: NDSolve with implicit function
  • Next by thread: Re: NDSolve with implicit function