Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ODE Problem

9 views
Skip to first unread message

Thomas D. Dean

unread,
Mar 21, 2013, 4:00:53 PM3/21/13
to
eq1:=y=c1*exp(-2*x)+c2*exp(3*x);
eq2:=Diff(lhs(eq1),x) = diff(rhs(eq1),x);
eq3:=Diff(lhs(eq1),x,x) = diff(rhs(eq1),x,x);
eq8:=eliminate([eq1,eq2,eq3],[c1,c2]);
eq9:=op(op(nops(eq8),eq8))=0;
dsolve(eq9);
Error, (in dsolve) expected an ordinary differential equation.
Received: 6*y = 0

but, eq9 is not an ode. If I use

eq11:=subs(y = y(x), eq1);
eq12:=diff(eq11,x);
eq13:=diff(eq11,x,x);
eq18:=eliminate([eq11,eq12,eq13],[c1,c2]);
eq19 := op(op(nops(eq18),eq18)) = 0;
dsolve(eq19);

How do I do this without using subs(y=y(x),...)?

Tom Dean

Joe Riel

unread,
Mar 21, 2013, 5:31:10 PM3/21/13
to
Why not insert y(x) to begin with?

eq1 := y(x)=c1*exp(-2*x)+c2*exp(3*x);
eq2 := diff(eq1,x);
eq3 := diff(eq2,x);
eq8 := eliminate([eq1,eq2,eq3],[c1,c2]);
eq9 := op([-1,..],eq8)=0;
dsolve(eq9);


--
Joe Riel

Thomas D. Dean

unread,
Mar 21, 2013, 6:42:06 PM3/21/13
to
Thomas D. Dean wrote:
maxima has a nice feature that allows

eq1:y=c1*exp(-2*x)+c2*exp(3*x);
depends(y,x);
eq2:apply("+",eliminate([eq1,diff(eq1,x),diff(eq1,x,2)],[c1,c2]))=0;
ode2(eq2,y,x);

Tom Dean
0 new messages