Group C
Mathematics Assignment Solutions
5 Marks Step by Step Style
Z 1
2
Q1(a). Evaluate ex dx by trapezoidal rule, h = 0.1.
0
Given: Z 1
2
I= ex dx, h = 0.1
0
2
Here y = ex and x = 0, 0.1, 0.2, . . . , 1.0.
Formula:
h
I= [y0 + y10 + 2(y1 + y2 + · · · + y9 )]
2
x 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
y 1.0000 1.0101 1.0408 1.0942 1.1735 1.2840 1.4333 1.6323 1.8965 2.2479 2.7183
0.1
I= [1.0000 + 2.7183 + 2(1.0101 + 1.0408 + 1.0942 + 1.1735
2
+ 1.2840 + 1.4333 + 1.6323 + 1.8965 + 2.2479)]
= 0.05[3.7183 + 23.6252]
= 1.4672
Z 1
2
ex dx = 1.4672
0
Q1(b). Find f (0.29) from the table.
Given:
x 0.20 0.22 0.24 0.26 0.28 0.30
f (x) 1.6596 1.6698 1.6804 1.6912 1.7024 1.7139
Here h = 0.02. Since 0.29 is near the end, use Newton’s backward formula.
x − xn 0.29 − 0.30
u= = = −0.5
h 0.02
x y ∇y ∇2 y ∇3 y
0.24 1.6804 0.0106
0.26 1.6912 0.0108 0.0002
0.28 1.7024 0.0112 0.0004 0.0002
0.30 1.7139 0.0115 0.0003 −0.0001
u(u + 1) 2
f (x) = yn + u∇yn + ∇ yn + · · ·
2!
(−0.5)(0.5)
f (0.29) = 1.7139 + (−0.5)(0.0115) + (0.0003) + · · ·
2
= 1.7081
f (0.29) = 1.7081 approximately
1
d2 y dy
Q2(a). Solve 2
− 3 + 2y = 9ex by variation of parameters.
dx dx
Given:
y ′′ − 3y ′ + 2y = 9ex
First solve the homogeneous equation.
m2 − 3m + 2 = 0 ⇒ (m − 1)(m − 2) = 0
yc = C1 ex + C2 e2x
Let us assume
yp = uex + ve2x
Using variation of parameters, with y1 = ex , y2 = e2x ,
W = y1 y2′ − y2 y1′ = ex (2e2x ) − e2x (ex ) = e3x
′ y2 R e2x · 9ex
u =− =− = −9
W e3x
Integrating both sides,
u = −9x
y1 R ex · 9ex
v′ = = = 9e−x
W e3x
Integrating both sides,
v = −9e−x
Hence,
yp = (−9x)ex + (−9e−x )e2x = −9xex − 9ex
The term −9ex is included in C.F., so
yp = −9xex
y = C1 ex + C2 e2x − 9xex
Q2(b). Solve y ′′ − 5y ′ + 6y = ex cos x.
Given:
y ′′ − 5y ′ + 6y = ex cos x
Auxiliary equation:
m2 − 5m + 6 = 0 ⇒ (m − 2)(m − 3) = 0
C.F. = C1 e2x + C2 e3x
For P.I.,
1
P.I. = (ex cos x)
D2 − 5D + 6
Using shifting rule,
1
P.I. = ex cos x
(D + 1)2 − 5(D + 1) + 6
1
= ex cos x
D2 − 3D + 2
Let
1
cos x = A cos x + B sin x
D2 − 3D + 2
2
After substitution and comparison,
1 3
A= , B=−
10 10
Therefore,
2x 3x x cos x 3 sin x
y = C1 e + C2 e +e −
10 10
Q3(a). Prove L{sin t/t} = tan−1 (1/s) and hence find L{sin at/t}.
Let us assume Z ∞
sin at
I(a) = e−st dt
0 t
Differentiating with respect to a, Z ∞
dI
= e−st cos at dt
da 0
Using standard Laplace transform,
Z ∞
s
e−st cos at dt =
0 s2 + a2
So,
dI s
= 2
da s + a2
Integrating both sides with respect to a,
a
−1
I(a) = tan +C
s
When a = 0, I(0) = 0, so C = 0.
sin at a
L = tan−1
t s
Putting a = 1,
sin t −1 1
L = tan
t s
−1 4s + 3
Q3(b). Evaluate L .
(s − 4)2 (s + 3)2
Given:
4s + 3
F (s) =
(s − 4)2 (s + 3)2
By partial fractions, let
A B C D
F (s) = + 2
+ +
s − 4 (s − 4) s + 3 (s + 3)2
On comparing coefficients,
10 19 10 9
A=− , B= , C= , D=−
343 49 343 49
Therefore,
10 1 19 1 10 1 9 1
F (s) = − + 2
+ −
343 s − 4 49 (s − 4) 343 s + 3 49 (s + 3)2
3
Taking inverse Laplace transform,
10 4t 19 4t 10 −3t 9
f (t) = − e + te + e − te−3t
343 49 343 49
Q4(a). Find general and singular solution of py = p2 (x − b) + a.
Given:
dy
py = p2 (x − b) + a, p=
dx
Dividing by p,
a
y = p(x − b) +
p
Let us assume p is a parameter. Differentiating with respect to x,
dy dp a dp
= p + (x − b) − 2
dx dx p dx
Since dy/dx = p,
a dp
p = p + (x − b) − 2
p dx
a dp
(x − b) − 2 =0
p dx
For general solution,
dp
=0⇒p=C
dx
a
y = C(x − b) +
C
For singular solution,
a a
x−b= 2
⇒ p2 =
p x−b
Substituting in the original equation,
p
y = ±2 a(x − b)
dy
Q4(b). RK method for = 1 + y 2 , y(0) = 0, find y(0.2).
dx
Given:
f (x, y) = 1 + y 2 , x0 = 0, y0 = 0, h = 0.2
Formula:
k1 + 2k2 + 2k3 + k4
y1 = y0 +
6
k1 = hf (x0 , y0 ) = 0.2(1 + 02 ) = 0.2000
h k1
k2 = hf x0 + , y0 + = 0.2[1 + (0.1000)2 ] = 0.2020
2 2
h k2
k3 = hf x0 + , y0 + = 0.2[1 + (0.1010)2 ] = 0.2020
2 2
k4 = hf (x0 + h, y0 + k3 ) = 0.2[1 + (0.2020)2 ] = 0.2082
4
0.2000 + 2(0.2020) + 2(0.2020) + 0.2082
y(0.2) = 0 +
6
= 0.2027
y(0.2) = 0.2027
Q5(a). Solve (x2 D2 − xD − 3)y = x2 log x.
Given:
(x2 D2 − xD − 3)y = x2 log x
This is Cauchy-Euler type equation. Put x = ez .
xD = Dz , x2 D2 = Dz (Dz − 1)
Therefore,
[Dz (Dz − 1) − Dz − 3]y = e2z z
(Dz2 − 2Dz − 3)y = e2z z
Auxiliary equation:
m2 − 2m − 3 = 0 ⇒ (m − 3)(m + 1) = 0
C.F. = C1 x3 + C2 x−1
For P.I.,
1
P.I. = e2z z
(D + 2)2
− 2(D + 2) − 3
1
= e2z 2 z
D + 2D − 3
Let v = Az + B. Then
(D2 + 2D − 3)v = −3Az + (2A − 3B) = z
Comparing,
1 2
A=− , B=−
3 9
Hence,
2 1 2
P.I. = x − log x −
3 9
C 2 x2 2x2
y = C 1 x3 + − log x −
x 3 9
Z t
t sin t
Q5(b). Verify sin u cos(t − u) du = .
0 2
Given: Z t
I= sin u cos(t − u) du
0
Using convolution theorem,
1 s
L{sin t} = , L{cos t} =
s2 +1 s2 +1
1 s s
L{I} = · 2 = 2
s2 +1 s +1 (s + 1)2
Now,
t sin t 1 2s s
L = · 2 2
= 2
2 2 (s + 1) (s + 1)2
5
Since both Laplace transforms are same,
Z t
t sin t
sin u cos(t − u) du =
0 2
Q6(a). Find polynomial and calculate f (5.5) for given data.
Given:
x 0 2 3 5 7
y 1 47 97 251 477
Assume polynomial of the form
f (x) = ax2 + bx + c
Using x = 0, y = 1,
c=1
Using x = 2, y = 47,
4a + 2b + 1 = 47 ⇒ 2a + b = 23
Using x = 3, y = 97,
9a + 3b + 1 = 97 ⇒ 3a + b = 32
Subtracting,
a=9
Then,
2(9) + b = 23 ⇒ b = 5
Therefore,
f (x) = 9x2 + 5x + 1
Now,
f (5.5) = 9(5.5)2 + 5(5.5) + 1
= 9(30.25) + 27.5 + 1 = 272.25 + 27.5 + 1 = 300.75
f (x) = 9x2 + 5x + 1, f (5.5) = 300.75
dy
Q6(b). Euler’s method for = xy, y(0) = 1, find y(1), h = 0.2.
dx
Given:
dy
= xy, y(0) = 1, h = 0.2
dx
Euler formula:
yn+1 = yn + hf (xn , yn )
n xn yn yn+1 = yn + 0.2xn yn
0 0.0 1.0000 1.0000
1 0.2 1.0000 1.0400
2 0.4 1.0400 1.1232
3 0.6 1.1232 1.2580
4 0.8 1.2580 1.4593
Therefore, at x = 1,
y(1) = 1.4593
Q7(a). Solve y ′′ + 4y = sin 2x by variation of parameters.
6
Given:
y ′′ + 4y = sin 2x
Homogeneous equation:
m2 + 4 = 0 ⇒ m = ±2i
yc = C1 cos 2x + C2 sin 2x
Here sin 2x is already a complementary function term, so resonance occurs. Let us assume
yp = x(A cos 2x + B sin 2x)
On substituting in y ′′ + 4y = sin 2x, we get
x
yp = − cos 2x
4
Hence,
x
y = C1 cos 2x + C2 sin 2x − cos 2x
4
Q7(b). Solve (x4 + y 4 )dx − xy 3 dy = 0.
Given:
(x4 + y 4 )dx − xy 3 dy = 0
Writing x as a function of y,
dx xy 3
= 4
dy x + y4
This is homogeneous. Let us assume
x = vy
Differentiating with respect to y,
dx dv
=v+y
dy dy
Substituting,
dv vy 4 v
v+y = 4 4 4
= 4
dy v y +y v +1
dv v v5
y = 4 −v =− 4
dy v +1 v +1
Separating variables,
1 1 dy
+ 5 dv = −
v v y
Integrating both sides,
1
log v − = − log y + C
4v 4
1
log(vy) − 4 = C
4v
Putting v = x/y,
y4
log x − =C
4x4
Q8(a). Find Laplace transform of f (t) = sin t, 0 < t < π and f (t) = 0, t > π.
Given: (
sin t, 0 < t < π,
f (t) =
0, t > π.
7
By definition, Z ∞
L{f (t)} = e−st f (t)dt
0
Since f (t) = 0 for t > π, Z π
L{f (t)} = e−st sin t dt
0
Using integration result,
e−st (−s sin t − cos t)
Z
e−st sin t dt =
s2 + 1
Therefore, π
e−st (−s sin t − cos t)
L{f (t)} =
s2 + 1 0
−πs
e (1) + 1
=
s2 +1
1 + e−πs
L{f (t)} =
s2 + 1
Z ∞
Q8(b). Evaluate e−3t sin t cos t dt.
0
Given: Z ∞
I= e−3t sin t cos t dt
0
Using identity,
2 sin t cos t = sin 2t
1 ∞ −3t
Z
I= e sin 2t dt
2 0
Using Laplace transform, Z ∞
a
e−st sin at dt =
0 s 2 + a2
Here s = 3 and a = 2.
1 2 1
I= · 2 =
2 3 + 22 13
1
I=
13
Z 1
Q9(a). Evaluate ex dx by trapezoidal rule, h = 0.1.
0
Given: Z 1
I= ex dx, h = 0.1
0
Here y = ex .
x 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
y 1.0000 1.1052 1.2214 1.3499 1.4918 1.6487 1.8221 2.0138 2.2255 2.4596 2.7183
Trapezoidal formula:
h
I= [y0 + y10 + 2(y1 + y2 + · · · + y9 )]
2
8
0.1
I= [1.0000 + 2.7183 + 2(1.1052 + 1.2214 + 1.3499 + 1.4918
2
+ 1.6487 + 1.8221 + 2.0138 + 2.2255 + 2.4596)]
= 1.7197
Z 1
ex dx = 1.7197
0
Q9(b). Newton’s divided difference interpolation.
Given points:
(2, 3), (4, 43), (7, 778), (8, 1515)
Divided difference table:
x y f [x0 , x1 ] f [x0 , x1 , x2 ] f [x0 , x1 , x2 , x3 ]
2 3
4 43 20
7 778 245 45 8
8 1515 737 123
Newton polynomial is
f (x) = 3 + 20(x − 2) + 45(x − 2)(x − 4) + 8(x − 2)(x − 4)(x − 7)
Expanding,
f (x) = 8x3 − 59x2 + 150x − 117
Therefore, the required curve is
y = 8x3 − 59x2 + 150x − 117
Q10(a). Solve y = 2px + yp2 , where p = dy/dx.
Given:
dy
y = 2px + yp2 , p=
dx
Rearranging,
y(1 − p2 ) = 2px
2p
y = xϕ(p), ϕ(p) =
1 − p2
Differentiating with respect to x,
dp
p = ϕ(p) + xϕ′ (p)
dx
So,
dx ϕ′ (p)
= dp
x p − ϕ(p)
Now,
ϕ′ (p) 2
= 3
p − ϕ(p) p −p
Integrating both sides,
log x = −2 log p + log(p2 − 1) + log C
p2 − 1
x=C
p2
9
Also,
2p 2C
y=x 2
=−
1−p p
Eliminating p,
y 2 = 4C(C − x)
−1 1
Q10(b). Evaluate L using convolution theorem.
(s + 2s + 5)2
2
Given:
1
F (s) =
(s2 + 2s + 5)2
Complete the square,
s2 + 2s + 5 = (s + 1)2 + 4 = (s + 1)2 + 22
We know,
−1 1 1
L = (sin at − at cos at)
(s + a2 )2
2 2a3
Here a = 2.
−1 1 1
L = (sin 2t − 2t cos 2t)
(s + 4)2
2 16
Using first shifting theorem,
L−1 {F (s + 1)} = e−t f (t)
Therefore,
e−t
−1 1
L = (sin 2t − 2t cos 2t)
(s + 2s + 5)2
2 16
10