       Re: Why doesn't Mathematica solve this simple differential equation?

• To: mathgroup at smc.vnet.net
• Subject: [mg69293] Re: Why doesn't Mathematica solve this simple differential equation?
• From: Joseph Gwinn <JoeGwinn at comcast.net>
• Date: Tue, 5 Sep 2006 05:31:13 -0400 (EDT)
• Organization: Gwinn Instruments
• References: <eddqq8\$3vq\$1@smc.vnet.net> <edgpfu\$oie\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```In article <edgpfu\$oie\$1 at smc.vnet.net>,
Paul Abbott <paul at physics.uwa.edu.au> wrote:

> In article <eddqq8\$3vq\$1 at smc.vnet.net>,
>  Joseph Gwinn <JoeGwinn at comcast.net> wrote:
>
> > Here is the system I'm trying to solve.  It's an electrical circuit
> > consisting of a capacitor C1 (with initial voltage 4.0 volts), a
> > resistor R1, and a diode in series.
>
> There is an NDSolve example involving a diode in the built-in
> documentation. Evaluate
>
>   FrontEndExecute[FrontEnd`HelpBrowserLookup[
>
> and click on the "Demos" link.

It's a good example, even if their diode model is nonphysical.

> > Approach 1:
> >
> > eqns11 = {Q1'[t] == -Iloop[t], Q1[t] == C1*Vc[t],     Vr[t] ==
> > R1*Is*Exp[Vd[t]/0.026], Vc[t] == Vr[t] + Vd[t], Vc == 4.0}
> >
> > eqns12 = eqns11 /. {C1 -> 1.0*10^-6, R1 -> 16, Is -> 10^-13}
> >
> > eqns12soln = NDSolve[eqns12, Q1, {t, 0, 1}]
> >
> > Approach 2:
> >
> > eqns21 = {Vc'[t] == -Id[t]/C1, Vc[t] == 0.026*Log[Id[t]/Is] + R1*Id[t],
> > Vc == 4.0}
> >
> > eqns22 = eqns11 /. {C1 -> 1.0*10^-6, R1 -> 16, Is -> 10^-13}
>
> You mean
>
>   eqns22 = eqns21 /. {C1 -> 1.0*10^-6, R1 -> 16, Is -> 10^-13} ?

Yes.  The error message changes to a complaint that the system is
underdetermined.  Actually, this is progress, because the nature of
whatever I'm missing is now better constrained.

> Even so, your equations are inconsistent.

I'm guessing that it isn't enough for me to give the differential
(Vc'[t]==Q'[t]/C1), I also need to give the other piece of information
from the physics (Vc[t]==Q[t]/C).

Thanks,

Joe

> > eqns22soln = NDSolve[eqns22, Vc, {t, 0, 1}]
> >
> > Both approaches fail with Mathematica complaining that "NDSolve::ndode:
> > Input is not an ordinary differential equation".
>
> Which is not suprising.
>
> Cheers,
> Paul
>
> _______________________________________________________________________
> Paul Abbott                                      Phone:  61 8 6488 2734
> School of Physics, M013                            Fax: +61 8 6488 1014
> The University of Western Australia         (CRICOS Provider No 00126G)
> AUSTRALIA                               http://physics.uwa.edu.au/~paul

```

• Prev by Date: RE: Books on learning mathematics with Mathematica
• Next by Date: Re: Why doesn't Mathematica solve this simple differential equation?
• Previous by thread: Re: Why doesn't Mathematica solve this simple differential equation?
• Next by thread: Re: Why doesn't Mathematica solve this simple differential equation?