Practical-3 Plotting of Third Order Solution Family of Differential Equation
Practical-3 Plotting of Third Order Solution Family of Differential Equation
Solution:
2
y[x] → ⅇ 1 + ⅇ 2 + ⅇ x 3
x 2x 2x
Out[2]=
2
ⅇ + 0.5 ⅇ ⅇ
x 2x 2x
Out[3]= + x
3
ⅇx
+ⅇ
2x
Out[4]= - x
2
-ⅇ - 4 ⅇ +2ⅇ
x 2x 2x
Out[5]= x
30
20
10
-4 -2 2
Out[6]=
2
ⅇ x + ⅇ + 0.5
2x x
-10
3
ⅇx
-20
ⅇ
2x
x-
2
-30
2ⅇ x-ⅇ -4ⅇ
2x x 2x
Solution:
3
y[x] → ⅇ 1 + ⅇ 2 + ⅇ 3
-7 x x 3x
Out[8]=
ⅇ +2ⅇ
-7 x 3x
Out[9]=
1
ⅇ +ⅇ
-7 x 3x
Out[10]= -
2
-ⅇ -4ⅇ +2ⅇ
-7 x x 3x
Out[11]=
- 0.5 ⅇ -2ⅇ +ⅇ
-7 x x 3x
Out[12]=
20
10
1 -10
ⅇ ⅇ
3x -7 x
-
2
-4ⅇ +
-7 x x
-ⅇ
-20
-0.5 ⅇ -2ⅇ
-7 x
Solution:
4
y[x] → ⅇ 1 + ⅇ 2 + ⅇ 3
-4 x x 7x
Out[15]=
ⅇ +2ⅇ
-4 x 7x
Out[16]=
-2 ⅇ + 10 ⅇ + 3 ⅇ
-4 x x 7x
Out[17]=
-ⅇ - 4 ⅇ + 20 ⅇ
-4 x x 7x
Out[18]=
- 0.5 ⅇ -2ⅇ +ⅇ
-4 x x 7x
Out[19]=
80
60
40
ⅇ +2ⅇ
Out[20]= -4 x 7x
20
-2 ⅇ + 10 ⅇ
-4 x
4ⅇ +
-0.4 -0.2
-4 x x 0.2 0.4
-ⅇ -
-0.5 ⅇ -2ⅇ
-4 x
Solution:
5
17 Cos [2 x] + 6 Sin [2 x]
y[x] → ⅇ 1 + ⅇ 2 + ⅇ 3 +
-x 3x 11 x
Out[22]=
1625
17 Cos [2 x] + 6 Sin [2 x]
ⅇ +2ⅇ
-x 11 x
Out[23]= +
1625
17 Cos [2 x] + 6 Sin [2 x]
Out[24]= 10 ⅇ - x + 3 ⅇ 3 x + 6 ⅇ 11 x +
1625
17 Cos [2 x] + 6 Sin [2 x]
-ⅇ -7ⅇ + 0.7 ⅇ
-x 3x 11 x
Out[25]= +
1625
17 Cos [2 x] + 6 Sin [2 x]
- 10.5 ⅇ +2ⅇ +ⅇ
-x 3x 11 x
Out[26]= +
1625
27
4 × 10
27
3 × 10
27
2 × 10
ⅇ +2ⅇ
-x 11 x
Out[27]= +
27
ⅇ +3ⅇ
× 10
110 -x 3x
-7ⅇ
-x 3x
-ⅇ +
4.5 5.0 5.5 6.0
-10.5 ⅇ +2ⅇ
-x
Solution:
6
In[25]:= sol = DSolve [(x ^ 3) * y ''' [x] + (3 x ^ 2) * y '' [x] + x * y '[x] + y[x] ⩵ 0, y[x], x]
sol1 = Evaluate [ y[x] / . sol 〚 1〛 / . {C[1] → 1, C[2] → 0.5, C[3] → 2 / 3}]
sol2 = y[x] / . sol 〚 1〛 / . {C[1] → - 1 / 2, C[2] → 0, C[3] → 1}
sol3 = y[x] / . sol 〚 1〛 / . {C[1] → - 1, C[2] → - 4, C[3] → 2}
Plot [{sol1, sol2, sol3 }, {x, - 5, 3}, PlotRange → {- 30, 30 },
PlotStyle → {{Red, Thickness [0.01 ]}, {Green , Thick }, {Purple , Thickness [0.02 ]}},
PlotLegends → {sol1, sol2, sol3 }]
1 1 1
Out[25]= y[x] → + x 3 Cos 3 Log [x] + x 2 Sin 3 Log [x]
x 2 2
1 2 1 1
Out[26]= + x Cos 3 Log [x] + 0.5 x Sin 3 Log [x]
x 3 2 2
1 1
Out[27]= - + x Cos 3 Log [x]
2x 2
1 1 1
Out[28]= - +2 x Cos 3 Log [x] - 4 x Sin 3 Log [x]
x 2 2
30
20
1 1 2
10 + 0.5 x sin 3 log(x) + x cos
x 2 3
1 1
Out[29]= x cos 3 log(x) -
0.5 1.0 1.5 2.0 2.5 3.0 2 2x
1 1
-10 - -4 x sin 3 log(x) + 2 x cos
x 2
-20
-30
Question 6 :
Solve third order differential equation x ^ 3
(d ^ 3 y) / dx ^ 3 - 4 x ^ 2 (d ^ 2 y) / dx ^ 2 + 8 x dy / dx - 8 y
4 logx and plot its any four solutions.
Solution :
7
In[30]:= sol = DSolve [(x ^ 3) * y ''' [x] + (- 4 x ^ 2) * y '' [x] + 8 x * y '[x] - 8 y[x] ⩵ 4 Log [x], y[x], x]
sol1 = Evaluate [ y[x] / . sol 〚 1〛 / . {C[1] → 1, C[2] → 0.5, C[3] → 2 / 3}]
sol2 = y[x] / . sol 〚 1〛 / . {C[1] → - 1 / 2, C[2] → 0, C[3] → 1}
sol3 = y[x] / . sol 〚 1〛 / . {C[1] → - 1, C[2] → - 4, C[3] → 2}
Plot [{sol1, sol2, sol3 }, {x, - 5, 3}, PlotRange → {- 30, 30 },
PlotStyle → {{Red, Thickness [0.01 ]}, {Green , Thick }, {Purple , Thickness [0.02 ]}},
PlotLegends → {sol1, sol2, sol3 }]
1
y[x] → x 1 + x 2 + x 3 +
2 4
Out[30]= × (- 7 - 4 Log [x])
8
2 x4 1
Out[31]= x + 0.5 x2 + + × (- 7 - 4 Log [x])
3 8
x 4
1
Out[32]= - +x + × (- 7 - 4 Log [x])
2 8
2 4
1
Out[33]= -x - 4 x + 2 x + × (- 7 - 4 Log [x])
8
30
20
2 x4 1
10 + 0.5 x 2 + x + × (-4 log(x) - 7)
3 8
x 1
Out[34]= x4 - + × (-4 log(x) - 7)
0.5 1.0 1.5 2.0 2.5 3.0 2 8
1
-10 2 x4 - 4 x2 - x + × (-4 log(x) - 7)
8
-20
-30