[Date Index]
[Thread Index]
[Author Index]
Re: Why doesn't Mathematica solve this simple differential equation?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg69254] Re: Why doesn't Mathematica solve this simple differential equation?
*From*: Peter Pein <petsie at dordos.net>
*Date*: Sun, 3 Sep 2006 23:46:58 -0400 (EDT)
*References*: <eddqq8$3vq$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Joseph Gwinn schrieb:
> 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.
>
>
> 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[0] == 4.0}
>
> eqns12 = eqns11 /. {C1 -> 1.0*10^-6, R1 -> 16, Is -> 10^-13}
>
> eqns12soln = NDSolve[eqns12, Q1, {t, 0, 1}]
>
You want to solve for Q1. Unless there is an dependency in a previous
definition of Iloop between Q1 and the voltages, the relevant equations
remaining are:
Q1'[t] == -Iloop[t] and Q1[t] == C1*Vc[t]
with unknown(?) Iloop. Obviously this can not be solved.
>
> Approach 2:
>
> eqns21 = {Vc'[t] == -Id[t]/C1, Vc[t] == 0.026*Log[Id[t]/Is] + R1*Id[t],
> Vc[0] == 4.0}
>
> eqns22 = eqns11 /. {C1 -> 1.0*10^-6, R1 -> 16, Is -> 10^-13}
>
> eqns22soln = NDSolve[eqns22, Vc, {t, 0, 1}]
The same happens here more functions (all undefined?) than equations.
>
>
> Both approaches fail with Mathematica complaining that "NDSolve::ndode:
> Input is not an ordinary differential equation".
>
> Another, simpler, problem (same circuit but without the R1) solves
> happily, so long as I eliminate all intermediate variables manually.
>
> eqns1 = {Vd'[t] == -Is*Exp[Vd[t]/0.026]/C, Vd[0] == 4.0}
>
> eqns2 = eqns1 /. {C -> 1.0*10^-6, Is -> 10^-13}
>
> eqns2soln = NDSolve[eqns2, Vd, {t, 0, 1}]
>
One function, one equation - Mathematica is happy
>
> Any ideas?
>
> Joe Gwinn
>
consider this example, where elimination is trivial:
In[4]:=
DSolve[{f'[x] == g[x] - f[x], g[x] == Sin[x]}, f[x], x]
From In[4]:=
"DSolve::deqx: Supplied equations are not differential equations of the
given functions."
Out[4]=
DSolve[{f'[x] == g[x] - f[x], g[x] == Sin[x]}, f[x], x]
and
In[5]:=
DSolve[
Eliminate[{f'[x] == g[x] - f[x], g[x] == Sin[x]}, g[x]],
f, x]
solves the deq.
HTH
Peter
Prev by Date:
**RE: how to identify plane and measuring planar area**
Next by Date:
**Re: Why doesn't Mathematica solve this simple differential equation?**
Previous by thread:
**Why doesn't Mathematica solve this simple differential equation?**
Next by thread:
**Re: Why doesn't Mathematica solve this simple differential equation?**
| |