Contoh Materi Wolfram
Contoh Materi Wolfram
Contoh Materi Wolfram
1. y ''- 5y ' + 6y = 0
2. y(4) +2y(3) + 3y '' + 2y ' + y = 0
3. y '' + 6y ' - 7y = 0; y(0) = 0; y '(0) = 4
In[1]:= DSolve[y ''[x] - 5 y '[x] + 6 y[x] ⩵ 0, y, x]
Out[1]= y → Function{x}, ⅇ2 x C[1] + ⅇ3 x C[2]
In[2]:= DSolve[y''[x]-5y'[x]+6y[x]=0]
Input:
ODE names:
Autonomous equation:
y′′ (x) -6 y(x) + 5 y′ (x)
Sturm-Liouville equation:
ⅆ
ⅇ-5 x y′ (x) + 6 ⅇ-5 x y(x) 0
ⅆx
Sturm-Liouville equation »
ODE classification:
Alternate forms:
Hide steps
y(x) c1 ⅇ2 x + c2 ⅇ3 x
Possible intermediate steps:
ⅆ2 y(x) ⅆy(x)
Solve ⅆx2
-5 ⅆx
+ 6 y(x) 0 :
ⅇλ x into the
differential equation:
ⅆ2 λ x ⅆ λx
ⅇ - 5 ⅇ + 6 ⅇλ x 0
ⅆx 2 ⅆ x
ⅆ2
Substitute ⅆx2
ⅇλ x
λ 2 ⅇλ x
and
ⅆ
ⅆx
ⅇλ x
λ ⅇλ x :
λ2 ⅇλ x - 5 λ ⅇλ x + 6 ⅇλ x 0
Factor out ⅇλ x
:
λ2 - 5 λ + 6 ⅇλ x 0
Since ⅇλ x ≠ 0 for
any finite λ
, the zeros must come from the polynomial:
λ2 - 5 λ + 6 0
Factor:
(λ - 3) (λ - 2) 0
Solve for λ :
λ 2 or λ 3
The root λ
2 gives
y1 (x)
c 1 ⅇ2 x as a
solution, where
c1 is an
arbitrary constant.
contoh_materi_wolfram.nb 3
The root λ
3 gives
y2 (x)
c 2 ⅇ3 x as a
solution, where
c2 is an
arbitrary constant.
The general solution is the sum of the above solutions:
Answer:
y y′ y(0) 1
y′ (0) 0
x y
y y′ y(0) 0
y′ (0) 1
x y
20
10
(sampling y(0) and y′ (0))
x
0.2 0.4 0.6 0.8 1.0
-10
-20
y(0) 1.
y′ (0) 1.
y
x
0.5 1.0 1.5 2.0 2.5 3.0 3.5
4 contoh_materi_wolfram.nb
000
000
Initial conditions:
y(0)
y′ (0)
More controls
Possible Lagrangian:
1
ℒ(y′ , y, x) ⅇ-5 x (y′ )2 - 6 ⅇ-5 x y2
2
3 x
Out[3]= y → Function{x}, ⅇ-x/2 C[3] Cos +
2
3 x 3 x 3 x
ⅇ-x/2 x C[4] Cos + ⅇ-x/2 C[1] Sin + ⅇ-x/2 x C[2] Sin
2 2 2
In[4]:= DSolve[y''''[x]+2y'''[x]+3y''[x]+2y'[x]+y[x]⩵0]
Input:
Autonomous equation:
ODE classification:
Alternate form:
Hide steps
3 x 3 x 3 x 3 x
y(x) c1 ⅇ-x/2 sin + c2 ⅇ-x/2 x sin + c3 ⅇ-x/2 cos + c4 ⅇ-x/2 x cos
2 2 2 2
Possible intermediate steps:
ⅆ4 y(x) ⅆ3 y(x) ⅆ2 y(x) ⅆy(x)
Solve ⅆx4
+2 ⅆx3
+3 ⅆx2
+2 ⅆx
+ y(x) 0 :
ⅆ4
Substitute ⅆx4
ⅇλ x
λ 4 ⅇλ x
,
ⅆ3
ⅆx3
ⅇλ x
λ 3 ⅇλ x
,
ⅆ2
ⅆx2
ⅇλ x
λ 2 ⅇλ x
,
and
ⅆ
ⅆx
ⅇλ x
λ ⅇλ x :
λ4 ⅇλ x + 2 λ3 ⅇλ x + 3 λ2 ⅇλ x + 2 λ ⅇλ x + ⅇλ x 0
Factor out ⅇλ x
:
λ4 + 2 λ3 + 3 λ2 + 2 λ + 1 ⅇλ x 0
6 contoh_materi_wolfram.nb
Since ⅇλ x ≠ 0 for
any finite λ
, the zeros must come from the polynomial:
λ4 + 2 λ3 + 3 λ2 + 2 λ + 1 0
Factor:
2
λ2 + λ + 1 0
Solve for λ :
1 ⅈ 3 1 ⅈ 3 1 ⅈ 3 1 ⅈ 3
λ- + or λ - + or λ - - or λ - -
2 2 2 2 2 2 2 2
The roots λ
- 12
±
ⅈ 3
2
both
have muliplicity
2 and give
-1/2+ⅈ 3 2 x
y1 (x) c1 ⅇ
,
3 2 x
y2 (x) c2 ⅇ-1/2-ⅈ
,
3 2 x
y3 (x) c3 ⅇ-1/2+ⅈ x
,
3 2 x
y4 (x) c4 ⅇ-1/2-ⅈ x as
solutions, where
c1
,
c2
,
c3
,
and
c4 are
arbitrary constants.
The general solution is the of the above solutions
contoh_materi_wolfram.nb 7
3 x 3 x 3 x 3 x
c3 x ⅇ-x/2 cos + ⅈ ⅇ-x/2 sin + c4 x ⅇ-x/2 cos - ⅈ ⅇ-x/2 sin
2 2 2 2
Regroup terms:
3 x 3 x
y(x) (c1 + c2 ) ⅇ-x/2 cos + (c3 + c4 ) ⅇ-x/2 x cos +
2 2
3 x 3 x
ⅈ (c1 - c2 ) ⅇ-x/2 sin + ⅈ (c3 - c4 ) ⅇ-x/2 x sin
2 2
Redefine c1 + c2
as c1 ,
ⅈ (c1 - c2 ) as
c2 ,
c3 + c 4 as
c3 , and
ⅈ (c3 - c4 ) as
c4 , since
these are arbitrary constants:
Answer:
3 x 3 x 3 x 3 x
y(x) c1 ⅇ-x/2 cos + c2 ⅇ-x/2 sin + c3 ⅇ-x/2 x cos + c4 ⅇ-x/2 x sin
2 2 2 2
y(0) 1
y y′ y′ (0) 0
y′′ (0) 0
y(3) (0) 0
x y
8 contoh_materi_wolfram.nb
y(0) 0
y y′ y′ (0) 1
y′′ (0) 0
y(3) (0) 0
x y
y(0) 0
y y′ y′ (0) 0
y′′ (0) 1
y(3) (0) 0
x y
y(0) 0
y y′ y′ (0) 0
y′′ (0) 0
y(3) (0) 1
x y
x
10 20 30 40 50
(sampling y(0), y′ (0), y′′ (0) and y(3) (0))
-0.5
-1.0
y(0) 1.
y′ (0) 1.
y′′ (0) 1.
y(3) (0) 1.
y
3 y(x)
x
1 2 3 4
Initial conditions:
y(0)
contoh_materi_wolfram.nb 9
y(0)
y′ (0)
y′′ (0)
y(3) (0)
More controls
In[6]:= DSolve[y''[x]+6y'[x]-7y[x]⩵0,y[0]==0,y'[0]==4]
Input:
ODE names:
Autonomous equation:
y′′ (x) 7 y(x) - 6 y′ (x)
Sturm-Liouville equation:
ⅆ
ⅇ6 x y′ (x) - 7 ⅇ6 x y(x) 0
ⅆx
Sturm-Liouville equation »
ODE classification:
Alternate forms:
Hide steps
1
y(x) ⅇ-7 x ⅇ8 x - 1
2
Possible intermediate steps:
ⅆ2 y(x) ⅆy(x)
Solve ⅆx2
+6 ⅆx
- 7 y(x) 0
, such that
10 contoh_materi_wolfram.nb
y(0) 0
and
y′ (0) 4 :
ⅆ2
Substitute ⅆx2
ⅇλ x
λ 2 ⅇλ x
and
ⅆ
ⅆx
ⅇλ x
λ ⅇλ x :
λ2 ⅇλ x + 6 λ ⅇλ x - 7 ⅇλ x 0
Factor out ⅇλ x
:
λ2 + 6 λ - 7 ⅇλ x 0
Since ⅇλ x ≠ 0 for
any finite λ
, the zeros must come from the polynomial:
λ2 + 6 λ - 7 0
Factor:
(λ - 1) (λ + 7) 0
Solve for λ :
λ -7 or λ 1
contoh_materi_wolfram.nb 11
The root λ
-7 gives
y1 (x)
c1 ⅇ-7 x as a
solution, where
c1 is an
arbitrary constant.
The root λ
1 gives
y2 (x)
c 2 ⅇx as a
solution, where
c2 is an
arbitrary constant.
The general solution is the sum of the above solutions:
y(x) y1 (x) + y2 (x) c1 ⅇ-7 x + c2 ⅇx
Substitute y(0) 0
into y(x)
ⅇ-7 x c1 + ⅇx c2 :
c1 + c 2 0
Substitute y′ (0) 4
ⅆy(x)
into ⅆx
-7 ⅇ-7 x c1 + ⅇx c2 :
-7 c1 + c2 4
Substitute c1 - 12
and
1
c2 2
into
y(x)
ⅇ-7 x c1 + ⅇx c2 :
Answer:
1
y(x) ⅇ-7 x ⅇ8 x - 1
2
y y′
x y