 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Re: Step-by-step solving and verifying of differential equations
| [MUG] Re: Step-by-step solving and verifying of differential equations |
|
Author: Maple Group
Posted: 26/10/2000 20:33:27 GDT
|
>> From: Maple Group
| >> From: Chuck Baker
| Can anyone help me with the syntax on how to solve and verify the
| solutions of the following differential equations?
|
| Can Maple provide a step by step solution as well as step-by-step
| verification mathematically to these equations? Any help you might be
| able to provide would be greatly appreciated.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Mon, 23 Oct 2000 13:02:10 -0700 (PDT)
From: Robert Israel
To:
Subject: Step-by-step solving and verifying of differential equations
Maple doesn't necessarily use the same methods that you would use in
solving the equations "by hand", but the "odeadvisor" function in the
DEtools package will give some hints of the method to use. For example:
> with(DEtools,odeadvisor):
> odeadvisor(y(x)*D(y)(x)+x=0);
[_separable]
You can also verify a solution using "odetest". For example:
> odetest(y(x)=-sqrt(-x^2+4), y(x)*D(y)(x)+x=0);
0
An answer of 0 indicates that the solution is correct, anything else
(that can't be simplified to 0) indicates that it is wrong.
Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Sat, 21 Oct 2000 13:22:33 +0200
To:
From: HARALD PLEYM
Subject: Step-by-step solving and verifying of differential
Hi Chuck,
You can use Maple in much the same way as you use pencil and paper. You can
copy all calculated expressions or more elegant, use suitable Maple
commands.
Example 1
y' = 3(y + 1)
> restart:
> deq:=diff(y(x),x)=3*(y(x)+1);
d
deq := -- y(x) = 3 y(x) + 3
dx
> deq/rhs(%);
d
-- y(x)
dx
---------- = 1
3 y(x) + 3
> map(Int,%,x);
d
/ -- y(x) /
| dx |
| ---------- dx = | 1 dx
| 3 y(x) + 3 |
/ /
> value(%)+(0=C);
1/3 ln(3 y(x) + 3) = x + C
> sol:=isolate(%,y(x));
sol := y(x) = 1/3 exp(3 x + 3 C) - 1
Control
> subs(sol,deq);
d
-- (1/3 exp(3 x + 3 C) - 1) = exp(3 x + 3 C)
dx
> value(%);
exp(3 x + 3 C) = exp(3 x + 3 C)
Direct solution
> dsolve(deq,y(x));
y(x) = -1 + exp(3 x) _C1
> odetest(%,deq);
0
Example 2
yy' + x = 0, y(0) = -2
> deq:=y(x)*diff(y(x),x)+x=0;
/d \
deq := y(x) |-- y(x)| + x = 0
\dx /
> deq+(-x=-x);
/d \
y(x) |-- y(x)| = -x
\dx /
> map(Int,%,x=0..X);
X X
/ /
| /d \ |
| y(x) |-- y(x)| dx = | -x dx
| \dx / |
/ /
0 0
> value(%);
2 2 2
1/2 y(X) - 1/2 y(0) = - 1/2 X
> subs(X=x,y(0)=-2,%);
2 2
1/2 y(x) - 2 = - 1/2 x
> solve(%,{y(x)});
2 2
{y(x) = sqrt(-x + 4)}, {y(x) = -sqrt(-x + 4)}
Control
> map(subs,[%],deq);
2 /d 2 \
[sqrt(-x + 4) |-- sqrt(-x + 4)| + x = 0,
\dx /
2 /d 2 \
-sqrt(-x + 4) |-- (-sqrt(-x + 4))| + x = 0]
\dx /
> value(%);
[0 = 0, 0 = 0]
Direct solution
> dsolve({deq,y(0)=-2},y(x));
2
y(x) = -sqrt(-x + 4)
> odetest(%,deq);
0
Cheers,
Harald Pleym
*************************************************************
Harald Pleym Telemark University College
Associate Professor Department of Technology
3914 PORSGRUNN
NORWAY
e-mail (job):
e-mail (private):
Web (job) http://www-pors.hit.no/~haraldp/
Web (private) http://members.tripod.com/~hpbepe/
fax: +47-35575210
*************************************************************
MAPLE is great, a tool for almost anything
*************************************************************
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Willard, Daniel Dr DUSA-OR"
To:
Subject: Step-by-step solving and verifying of differential equa
Date: Mon, 23 Oct 2000 10:37:48 -0400
You might try:
>with(DEtools, ODEadvisor);
which works with Maple V release 5. For proof, just differentiate and
perhaps substitute the expression for y. You can perhaps write your own
program to do it all in one fell swoop.
|
[View Complete Thread]
Previous by date: [MUG] Re: table -> plot3d in Maple V R 4, Maple Group
Next by date: [MUG] D operator applied to Maple procedures, Roland Winkler
Previous thread: [MUG] rootof and allvalues, Don Hartig
Next thread: [MUG] D operator applied to Maple procedures, Roland Winkler
|
|
|