Sie sind auf Seite 1von 8

Holly Powell, Section 2, Maple Lab 0

0. Setup.
O with(plots): with(DEtools):

1. Expressions, derivatives and graphs.


The practice expression.
O f0:=exp(sin(x));
O f1:=diff(f0,x);
O f2:=diff(f1,x);
f0 := esin x

f1 := cos x esin x

f2 := Ksin x esin x C cos x 2 esin x (2.1.1)


O fvars:=x=-2*Pi..2*Pi,y=-3..3;
fvars := x = K2 p ..2 p, y = K3 ..3 (2.1.2)
O pf0:=plot(f0,fvars,color=RED):
O pf1:=plot(f1,fvars,color=GREEN):
O pf2:=plot(f2,fvars,color=BLUE):
O display({pf0,pf1,pf2},title="Practice graphs");

1
Practice graphs
3

K6 K4 K2 0 2 4 6
x

K1

K2

K3

A new expression.
Definitions.
O g0:=x^(3/2)*sin(x);
g0 := x3 / 2 sin x (2.2.1.1)
O g1 d diff g0, x ;
3
g1 := x sin x C x3 / 2 cos x (2.2.1.2)
2
O g2 d diff g1, x ;
3 sin x
g2 := C3 x cos x K x3 / 2 sin x (2.2.1.3)
4 x
Plots.
O gvars:=x=-2..2,y=-3..3;
gvars := x = K2 ..2, y = K3 ..3 (2.2.2.1)
O pg0:=plot(g0,gvars,color=RED):
O pg1:=plot(g1,gvars,color=GREEN):
O pg2:=plot(g2,gvars,color=BLUE):
O display({pg0,pg1,pg2},title="Real graphs");
2
O
Real graphs
3

K2 K1 0 1 2
x

K1

K2

K3
Limits.
O limit(g0,x=0);
0 (2.2.3.1)
O limit(g1,x=0);
0 (2.2.3.2)
O limit(g2,x=0);
0 (2.2.3.3)
Refined plots.
O gvars2:=x=0..4,y=-7..3.5;
gvars2 := x = 0 ..4, y = K7 ..3.5 (2.2.4.1)
O pg0:=plot(g0,gvars2,color=RED):
O pg1:=plot(g1,gvars2,color=GREEN):
O pg2:=plot(g2,gvars2,color=BLUE):
O display({pg0,pg1,pg2},title="Real graphs");
O

3
Real graphs

0
1 2 3 4
x

K2

y
K4

K6

Discussion.
Only positive values of x appear.

Behavior of graphs near x=0.

2. Implicit functions.
A contour plot.
O ex2:=1.3*ln(F)-0.8*F+ln(R)-1.1*R;
ex2 := 1.3 ln F K 0.8 F C ln R K 1.1 R (3.1.1)
O FRwindow := R=0.1..4,F=0.1..6;
FRwindow := R = 0.1 ..4, F = 0.1 ..6 (3.1.2)
O contourplot(ex2,FRwindow,title="R versus F");

4
R versus F
6

F 3

1 2 3 4
R
O

Discussion.

3. Simple Mechanics.
The equation and initial condition.
O de3:=diff(y(t),t,t)=-g; ic3:=y(0)=h,D(y)(0)=v;
d2
de3 := 2 y t = Kg
dt
ic3 := y 0 = h, D y 0 = v (4.1.1)

Solving the equation and checking the result.


O ans3:=dsolve({de3,ic3});
Methods for second order ODEs:
--- Trying classification methods ---
5

(4.2.1)
trying a quadrature
<- quadrature successful
1
ans3 := y t = K g t2 C v t C h (4.2.1)
2
O eval(de3,ans3);
Kg = Kg (4.2.2)

Initial condition on position.


O pos3:=diff(ans3,t);
d
pos3 := y t = Kg t C v (4.3.1)
dt
O eval pos3, ans3
Kg t C v = Kg t C v (4.3.2)

Initial condition on velocity.


O eval(ans3,t=0);
y 0 =h (4.4.1)
O ??

Discussion.

4. From the textbook.


Section 1.1, Exercise 31.
O eq31:=diff(y(t),t)=2*t-1-y(t)^2;ic31:={[y(0)=0],[y(1)=0],[y
(3)=0]};
d
eq31 := y t = 2 tK1Ky t 2
dt
ic31 := y 0 = 0 , y 1 = 0 , y 3 = 0 (5.1.1)

Solution (Graph).
O DEplot(eq31,y,t=-1..5,ic31,y=-3..3,title="Exercise 31");
dsolve/numeric: entering dsolve/numeric
DEtools/convertsys: converted to first-order system Y'(x) =
f(x,Y(x)) namely (with Y' represented by YP)
YP1 = 2 t K 1 K Y12
DEtools/convertsys: correspondence between Y[i] names and
original functions:
Y1 = y t
dsolve/numeric: the procedure F(x,Y,YP) for computing Y'(x)=
f(x,Y(x)) is: proc (N, X, Y, YP) option [Y[1] = y(t)]; YP[1]
:= 2*X-1-Y[1]^2; 0 end proc
dsolve/numeric: initial conditions: x0=0., y0=[0.]
dsolve/numeric: entering dsolve/numeric
DEtools/convertsys: converted to first-order system Y'(x) =
6
f(x,Y(x)) namely (with Y' represented by YP)
YP1 = 2 t K 1 K Y12
DEtools/convertsys: correspondence between Y[i] names and
original functions:
Y1 = y t
dsolve/numeric: the procedure F(x,Y,YP) for computing Y'(x)=
f(x,Y(x)) is: proc (N, X, Y, YP) option [Y[1] = y(t)]; YP[1]
:= 2*X-1-Y[1]^2; 0 end proc
dsolve/numeric: initial conditions: x0=1., y0=[0.]
dsolve/numeric: entering dsolve/numeric
DEtools/convertsys: converted to first-order system Y'(x) =
f(x,Y(x)) namely (with Y' represented by YP)
YP1 = 2 t K 1 K Y12
DEtools/convertsys: correspondence between Y[i] names and
original functions:
Y1 = y t
dsolve/numeric: the procedure F(x,Y,YP) for computing Y'(x)=
f(x,Y(x)) is: proc (N, X, Y, YP) option [Y[1] = y(t)]; YP[1]
:= 2*X-1-Y[1]^2; 0 end proc
dsolve/numeric: initial conditions: x0=3., y0=[0.]
Exercise
Exercise31
31
3

2
y(t)

K1 0 1 2 3 4 5
t

K1

K2

K3

7
Explicit solution.
O infolevel[dsolve]:=3;dsolve(eq31);
infoleveldsolve := 3
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
trying inverse linear
trying homogeneous types:
trying Chini
differential order: 1; looking for linear symmetries
trying exact
Looking for potential symmetries
trying Riccati
trying Riccati Special
trying Riccati sub-methods:
MobiusX @ MobiusY to canonical form of 0F1 with 0
parameter, subcase 2
<- Abel AIR successful: ODE belongs to the 0F1 0-
parameter (Airy type) class
y t (5.3.1)
1 1/3 1 1/3
= _C1 AiryAi 1, 2 2 t K 1 C AiryBi 1, 2 2t
2 2
1 1/3 1 1/3
K1 21 / 3 _C1 AiryAi 2 2 t K 1 C AiryBi 2 2t
2 2

K1

Discussion.
1)No, the graph only shows two solutions?
2) The upper solution curve intersects at both y=1 and y=0
3) Solutions increasing to x=inf, and probably aroundy=4 or 5 or something around that number
4)AiryAi and AiryBi - The Airy Ai and Bi wave functions
The Airy wave functions AiryAi and AiryBi are linearly independent solutions for w in the
equation w'' K z w = 0
_Cl -- Clairaut's ODE

Das könnte Ihnen auch gefallen