MathGroup Archive 2006

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

Search the Archive

Re: NDSolve with implicit function

rondeau at 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[{Derivative[1][x][t] == f[x[t], y[t]], g[x[t], y[t]] == 0, x[0] 
== 1}, {x, y}, {t, 0, 1}]

{{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