Professional Documents
Culture Documents
Aryan Kohli Bms
Aryan Kohli Bms
UPC: 32355301
SESSION: 2022 – 2023
Submitted to
Ms. Barkha
(Assistant Professor)
Department of Mathematics
Ram Lal Anand College
By
Aryan Kohli
(21058590006)
BMS
Ram Lal Anand College
University of Delhi
INDEX OF PRACTICAL PERFORMED
8. Plotting the integral surface of the first order partial 33-34 05-12-2022
differential equation with initial data
PRACTICAL - 1
Plotting of first order solution
family of Differential Equation
1.1 Solving Linear Ordinary Differential Equation
Out[ ]= 2
-4 -2 2 4
x 5x 9x 13 x 17 x
Out[ ]= - -4 + x, - x -4 + , -x -4 + , -x -4 + , -x -4 +
2 2 2 2 2
x
5 10 15 20 25 30 - -4 x
2
-100
5x
-x -4
2
-200
9x
Out[ ]= -x -4
2
-300
13 x
-x -4
2
-400
17 x
-x -4
-500 2
Question 6 : Solve first order differential equation 2 xe^2 ydy / dx - 3 x^4 - e^2 y =
0 and plot its solution.
practical 1.nb 3
In[ ]:= sol = DSolve[2 x * Exp[2 * y[x]] * y '[x] - 3 x ^ 4 - Exp[2 * y[x]] ⩵ 0, y[x], x]
tab = Tabley[x] /. sol[[1]] /. {C[1] → k}, k, 1 2, 10, 2
Plot[Evaluate[tab], {x, - 2, 2}, PlotStyle → Thick,
PlotLegends → {tab[[1]], tab[[2]], tab[[3]], tab[[4]], tab[[5]]}]
Solve: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution
information.
1
Out[ ]= y[x] → Log- x - x3 - 1
2
1 1 1 5
Out[ ]= Log- x - - x3 , Log- x -- x3 ,
2 2 2 2
1 9 1 13 1 17
Log- x - - x3 , Log- x - - x3 , Log- x - - x3
2 2 2 2 2 2
1 1
1 log-x -x 3 -
2 2
1 5
log-x -x 3 -
2 2
1 9
Out[ ]= -2 -1 1 2 log-x -x 3 -
2 2
1 13
log-x -x 3 -
2 2
-1
1 17
log-x -x 3 -
2 2
-2
x3
+1
3
x3
+2
3
12
x3
+3
3
10
x3
+4
3
8
x3
+5
6 3
Out[ ]=
x3
4
+6
3
x3
2 +7
3
3
x
1 2
+8
-2 -1 3
-2 x3
+9
3
x3
+ 10
3
Solve: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution
information.
Solve: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution
information.
practical 1.nb 5
Solve: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution
information.
Solve: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution
information.
1
Set: Tag Times in Null y[x] → Log[-x Plus[2]] is Protected.
2
1 1 1 5 1 9 1 13 1 17
Part: Part 6 of Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x3
2 2 2 2 2 2 2 2 2 2
does not exist.
1 1 1 5 1 9 1 13 1 17
Part: Part 7 of Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x3
2 2 2 2 2 2 2 2 2 2
does not exist.
1 1 1 5 1 9 1 13 1 17
Part: Part 8 of Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x3
2 2 2 2 2 2 2 2 2 2
does not exist.
1 1 1 5 1 9 1 13 1 17
Part: Part 6 of Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x3
2 2 2 2 2 2 2 2 2 2
does not exist.
1 1 1 5 1 9 1 13 1 17
Part: Part 7 of Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x3
2 2 2 2 2 2 2 2 2 2
does not exist.
1 1 1 5 1 9 1 13 1 17
Part: Part 8 of Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x 3 , Log-x - - x3
2 2 2 2 2 2 2 2 2 2
does not exist.
6 practical 1.nb
PRACTICAL - 2
Plotting Second Order Solution
Family Of Differential Equation
y[x] → ⅇx 1 + ⅇx x 2
Cos[x]
Out[124]= + 5 Sin[x]
2
Out[125]= - Cos[x] - 4 Sin[x]
2
2 sin(x) + cos(x)
cos(x)
Out[126]= 5 sin(x) +
-20 -10 10 20 2
-4 sin(x) - cos(x)
-2
-4
Question 2 :
Solve second order differential equation d^2 y / dx^2 + dy / dx - 6 y =
0 and plot its three solutions.
practical2.nb 3
Out[143]= ⅇ-3 x + 2 ⅇ2 x
ⅇ-3 x
Out[144]= + 5 ⅇ2 x
2
Out[145]= - ⅇ-3 x - 5 ⅇ2 x
1 × 1016
5 × 1015
ⅇ-3 x + 2 ⅇ2 x
ⅇ-3 x
Out[146]= + 5 ⅇ2 x
2
-20 -10 10 20
-ⅇ-3 x - 5 ⅇ2 x
-5 × 1015
50
3x 3x
- -
4ⅇ 2 x-ⅇ 2
3x 3x
-2 -1 1 2 - -
6ⅇ 2 x +3ⅇ 2
Out[152]=
3x 3x
- -
7ⅇ 2 x - 10 ⅇ 2
3x 3x
-50 - -
-5 ⅇ 2 x - 1.5 ⅇ 2
-100
4 × 107
3 × 107
2 × 107
4 ⅇ3 x cos(2 x) - ⅇ3 x sin(2 x)
7
1 × 10
Out[157]= 3 ⅇ3 x sin(2 x) + 6 ⅇ3 x cos(2 x)
-10 ⅇ3 x sin(2 x) - 7 ⅇ3 x cos(2 x)
-4 -2 2 4
-1 × 107
-2 × 107
Out[159]= - ⅇx + 4 ⅇx x
Out[160]= 3 ⅇx + 6 ⅇx x
Out[161]= - 10 ⅇx + 7 ⅇx x
Out[162]= - 1.5 ⅇx - 5 ⅇx x
Out[163]= 2 ⅇx + 8 ⅇx x
600
400
4 ⅇx x - ⅇ x
6 ⅇx x + 3 ⅇ x
200
Out[164]= 7 ⅇx x - 10 ⅇx
-5 ⅇx x - 1.5 ⅇx
-4 -2 2 4
8 ⅇx x + 2 ⅇ x
-200
-400
practical2.nb 7
8 practical2.nb
Practical - 3
Plotting of third order solution
family of differential equation
2
Out[ ]= ⅇx + 0.5 ⅇ2 x + ⅇ2 x x
3
ⅇx
Out[ ]= - - ⅇ2 x x
2
Out[ ]= - ⅇx - 4 ⅇ2 x + 2 ⅇ2 x x
30
20
10 2
ⅇ2 x x + ⅇx + 0.5 ⅇ2 x
3
ⅇx
Out[ ]=
-4 -2 2 -ⅇ2 x x -
2
-10
2 ⅇ2 x x - ⅇ x - 4 ⅇ 2 x
-20
-30
Out[26]= ⅇ-7 x + 2 ⅇ3 x
1
Out[27]= - ⅇ-7 x + ⅇ3 x
2
Out[28]= - ⅇ-7 x - 4 ⅇx + 2 ⅇ3 x
10
ⅇ-7 x + 2 ⅇ3 x
1
ⅇ3 x - ⅇ-7 x
2
Out[30]=
-0.4 -0.2 0.2 0.4
-ⅇ-7 x - 4 ⅇx + 2 ⅇ3 x
-0.5 ⅇ-7 x - 2 ⅇx + ⅇ3 x
-10
-20
Out[38]= ⅇ-4 x + 2 ⅇ7 x
Out[39]= - 2 ⅇ-4 x + 10 ⅇx + 3 ⅇ7 x
Out[40]= - ⅇ-4 x - 4 ⅇx + 20 ⅇ7 x
80
60 ⅇ-4 x + 2 ⅇ7 x
-2 ⅇ-4 x + 10 ⅇx + 3 ⅇ7 x
Out[42]=
40
-ⅇ-4 x - 4 ⅇx + 20 ⅇ7 x
-0.5 ⅇ-4 x - 2 ⅇx + ⅇ7 x
20
In[49]:= sol = DSolve[y '''[x] - 13 * y ''[x] + 19 * y '[x] + 33 y[x] ⩵ Cos[2 x], y[x], x]
sol1 = Evaluate[y[x] /. sol[[1]] /. {C[1] → 1, C[2] → 0, C[3] → 2}]
sol2 = Evaluate[y[x] /. sol[[1]] /. {C[1] → 10, C[2] → 3, C[3] → 6}]
sol3 = Evaluate[y[x] /. sol[[1]] /. {C[1] → - 1, C[2] → - 7, C[3] → 0.7}]
sol4 = Evaluate[y[x] /. sol[[1]] /. {C[1] → - 10.5, C[2] → 2, C[3] → 1}]
Plot[{sol1, sol2, sol3, sol4}, {x, 4, 6},
PlotStyle → {{Red, Thickness[0.01]}, {Green, Thick}, {Purple, Thickness[0.01]},
{Yellow, Thickness[0.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
2 x 3 x
2 ⅇ- - 4 ⅇ 2 sin 2/3
- 2 ⅇ 2 cos
2/3
22/3
-0.4 -0.2 0.2 0.4
Practical - 4
Solution of Differential
Equation by Variation of
Parameter Method
Question 1. Solve the differential equation d^2 y / dx^2 + 4 y =
sinx^2.
In[ ]:= e1 = y ''[x] + 4 * y[x] ⩵ Sin[x] ^ 2
cf = DSolve[y ''[x] + 4 * y[x] ⩵ 0, y[x], x]
In[ ]:= cf + pi
Out[ ]= y[x] → 1 Cos[2 x] + 2 Sin[2 x] -
1 1 x 1 1
Cos[2 x] Sin[x]4 + Sin[2 x] - + Sin[2 x] - Sin[4 x]
4 2 4 4 16
In[ ]:= cf + pi
Out[ ]= y[x] → 1 Cos[x] + 2 Sin[x] - Cos[x] Sin[x] +
x x x x
Cos[x] LogCos - Sin - LogCos + Sin + Sin[x]
2 2 2 2
In[ ]:= cf + pi
Out[ ]= y[x] → 1 Cos[2 x] + 2 Sin[2 x] +
ex Sin[2 x] Cos[2 x] Log[e] + 2 Sin[2 x] ex Cos[2 x] - 2 Cos[2 x] + Log[e] Sin[2 x]
-
2 4 + Log[e]2 2 4 + Log[e]2
Practical - 5
Solution of
Solution of Ordinary
Differerntial Equation
Question 1. Solve the system of differential equation dy / dx + y =
z + e^x, dz / dx + z = y + e^x
In[147]:= e1 = y '[x] + y[x] ⩵ z[x] + Exp[x]
e2 = z '[x] + z[x] ⩵ y[x] + Exp[x]
DSolve[{e1, e2}, {y[x], z[x]}, x]
1 1 1 1
Out[149]= y[x] → ⅇ-x - 1 + ⅇ2 x + ⅇ-x 1 + ⅇ2 x + ⅇ-2 x 1 + ⅇ2 x 1 + ⅇ-2 x - 1 + ⅇ2 x 2 ,
2 2 2 2
1 1 1 1
z[x] → ⅇ-x - 1 + ⅇ2 x + ⅇ-x 1 + ⅇ2 x + ⅇ-2 x - 1 + ⅇ2 x 1 + ⅇ-2 x 1 + ⅇ2 x 2
2 2 2 2
Out[156]= {x′ [t] ⩵ 3 x[t] + 2 y[t], y′ [t] ⩵ 5 x[t] + 3 y[t], x[0] ⩵ y[0] ⩵ 1}
1
Out[157]= x → Function{t}, ⅇ3 t- 10 t 5 - 10 + 5 ⅇ2 10 t
+ 10 ⅇ2 10 t
,
10
1
y → Function{t}, ⅇ3 t- 10 t 2 - 10 + 2 ⅇ2 10 t
+ 10 ⅇ2 10 t
4
Out[158]= {{True, True, True}}
20
10
Out[159]=
-40 -30 -20 -10 10
-10
-20
1 1
Out[161]= x → Function{t}, ⅇ3 t - 35 + 48 ⅇ2 t , y → Function{t}, ⅇ3 t 5 + 8 ⅇ2 t
13 13
Out[162]= {{False, False, True}}
20
10
Out[163]=
-40 -30 -20 -10 10
-10
-20
In[164]:= equs = {x '[t] + 7 x[t] - y[t] ⩵ 0, y '[t] + 2 * x[t] + 5 * y[t] ⩵ 0, x[0] ⩵ y[0] ⩵ - 1}
sol = DSolve[equs, {x, y}, t]
equs /. sol /. {t → RandomReal[]}
Plot[{x[t] /. sol, y[t] /. sol}, {t, - 40, 10}, PlotRange → {- 20, 20},
PlotStyle → {{Blue, Thickness[0.02]}, {Orange, Thick}}]
Out[164]= {7 x[t] - y[t] + x′ [t] ⩵ 0, 2 x[t] + 5 y[t] + y′ [t] ⩵ 0, x[0] ⩵ y[0] ⩵ - 1}
10
Out[167]=
-40 -30 -20 -10 10
-10
-20
10
Out[171]=
-40 -30 -20 -10 10
-10
-20
Practical 6
Solution of Cauchy Problem for First Order Partial Differential Equations
Question 1: Sove Cauchy problem 3 du/dx + 4 du/dy = 0 with initial condition u(x, 0) = sin x and plot its
solution.
Solution:
1
Out[ ]= u[x, y] → Sin 4 x - 3 y
4
1
Out[ ]= Sin 4 x - 3 y
4
2 Practical 6.nb
2
Question 2: Solve Cauchy problem y du/dx + x du/dy = 0 with initial condition u(0, y) = e-y and plot its
solutions.
Solution:
Out[ ]=
Practical 6.nb 3
Question 3: Solve Cauchy problem du/dx + 2 xy2 du/dx = 0 with u (x,2) = x and plot its solution.
Solution:
2-y+2 x2 y
y
Out[ ]= u[x, y] → -
2
2-y+2 x2 y
y
2
-y2
Out[ ]= ⅇx ⩵-
2
Out[ ]=
4 Practical 6.nb
Question 4: Solve Cauchy problem du/dx + xy2 du/dy = 0 with u (x, 2) = x and plot its solution.
Solution:
2-y+2 x2 y
y
Out[ ]= u[x, y] → -
2
2-y+2 x2 y
y
Out[ ]=
2
Out[ ]=
Practical 7
Plotting the characteristics of the first order partial differential equations
Question 1: Solve the partial differential equation xux + yux = u and plot its characteristic equations.
Solution:
Out[3]=
Out[4]=
-4 -2 2 4
-2
-4
Question 2: Solve the partial differential equation ux - uy = 1 and plot its characteristic equations.
Solution:
2 Practical 7.nb
Out[9]=
0
-2
-4
-4 -2 0 2 4
Practical 7.nb 3
Out[10]=
0
-2
-4
-4 -2 0 2 4
Practical 8
Plotting the integral surface of first order partial differential equation with initial data
Question 1: Solve first order partial differential equation ux + xuy = 0 with initial condition u(0, y) = sin y,
and plot its solution.
Solution:
1
Out[7]= u[x, y] → Sin - x2 + 2 y
2
Out[8]=
2 Practical 8.nb
Question 2: Solve first order partial differential equation xux + yuy = 2xy with initial condition u(x, x2 ) =
2, and plot its solution.
Solution:
Out[17]= ux, x2 ⩵ 2
2 x 3 + x4 y - y 3
Out[18]= u[x, y] →
x3
Out[19]=