Question: Building an ode piece by piece

Hello, it's been awhile since I've used maple and I'm a little stuck here.

I'm basically trying to model charging of a capacitor with a load dependant voltage source. Capacitor voltage depends on source voltage but source voltage depends on capacitor voltage, classic ode problem. Now I can define the entire ode in one statement and then solve but I'd like to define the components that the ode is made of and then solve for d(f(x))/dx and then dsolve. When I try to build an ode with multiple statements however, I get a 'too many levels of resursion' error.

System load on generator.
>Iload:=t->Cl*diff(Vcap(t),t);

                  Iload := t -> Cl diff(Vcap(t), t)

Generator voltage drop due to load.
> Vdrop:=t->(Iload(t)/(6*Fgen*Cgen))*(4*n^3+3*n^2-n);

                                            3      2
                               Iload(t) (4 n  + 3 n  - n)
             Vdrop := t -> 1/6 --------------------------
                                       Fgen Cgen

Generator voltage.
> Vsrc:=t->2*n*Vpeak-Vdrop(t);

                  Vsrc := t -> 2 n Vpeak - Vdrop(t)

Voltage of system capacitor.
> Vcap:=t->1/(1+R*Cl)*Vsrc(t);

                                     Vsrc(t)
                        Vcap := t -> --------
                                     1 + R Cl

> solve(Vcap(t), diff(Vcap(t), t));
Error, (in Vcap) too many levels of recursion

> dsolve(Vcap(t));
Error, (in Vcap) too many levels of recursion

>
 

I seem to recall in calc II using unapply or redef or something but I can't remember how to make this work. Any ideas would be greatly appreciated.

 

-Chris

Please Wait...