0% found this document useful (0 votes)
5 views

binary tree representation

The Engineering Analysis Report outlines various mathematical computations involving matrices, including finding the inverse of matrix C, calculating matrix A, and applying the Cayley-Hamilton theorem. It also explores numerical methods for finding extrema using the Newton-Raphson method and trapezoidal rule integration. Additionally, the report discusses Fourier series expansion for the function f(t) = t sin t, providing approximations for the DC component and coefficients.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

binary tree representation

The Engineering Analysis Report outlines various mathematical computations involving matrices, including finding the inverse of matrix C, calculating matrix A, and applying the Cayley-Hamilton theorem. It also explores numerical methods for finding extrema using the Newton-Raphson method and trapezoidal rule integration. Additionally, the report discusses Fourier series expansion for the function f(t) = t sin t, providing approximations for the DC component and coefficients.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Engineering Analysis Report: Solutions

Advanced Engineering Group

April 17, 2025


Contents

2
Q1: Advanced Linear Algebra
(a) Finding Matrix C = P DP −1
Given matrices: " # " #
1 1 1 0
P = , D=
1 2 0 −1

1. Compute P −1 : The determinant is det(P ) = (1)(2) − (1)(1) = 1.

1
" # " #
−1 2 −1 2 −1
P = =
det(P ) −1 1 −1 1

2. Calculate the product P D:


" #" # " # " #
1 1 1 0 (1)(1) + (1)(0) (1)(0) + (1)(−1) 1 −1
PD = = =
1 2 0 −1 (1)(1) + (2)(0) (1)(0) + (2)(−1) 1 −2

3. Compute C = (P D)P −1 :
" #" # " # " #
1 −1 2 −1 (1)(2) + (−1)(−1) (1)(−1) + (−1)(1) 3 −2
C= = =
1 −2 −1 1 (1)(2) + (−2)(−1) (1)(−1) + (−2)(1) 4 −3

The resulting matrix is: " #


3 −2
C=
4 −3

(b) Inverse of C
The determinant is det(C) = (3)(−3) − (−2)(4) = −9 + 8 = −1.

1 1 −3 2
" # " # " #
−1 −3 2 3 −2
C = = =
det(C) −4 3 −1 −4 3 4 −3

Interestingly, the inverse of C is itself:


" #
−1 3 −2
C = =C
4 −3

This means C is an involutory matrix (C 2 = I).

(c) Matrix A = B + C
" #
1 4
Given B = , we calculate A:
−3 6
" # " # " # " #
1 4 3 −2 1+3 4−2 4 2
A=B+C = + = =
−3 6 4 −3 −3 + 4 6 − 3 1 3

The matrix A is: " #


4 2
A=
1 3

3
(d) Cayley-Hamilton Theorem for Aπ
We want to compute Aπ using the Cayley-Hamilton theorem.
1. Find the characteristic equation of A:
" #
4−λ 2
det(A − λI) = det
1 3−λ
= (4 − λ)(3 − λ) − (2)(1)
= 12 − 4λ − 3λ + λ2 − 2
= λ2 − 7λ + 10 = 0
The eigenvalues are the roots: (λ − 2)(λ − 5) = 0 =⇒ λ1 = 2, λ2 = 5.
2. Express Aπ using the theorem: Since A satisfies its characteristic equation (A2 −7A+10I =
0), any analytic function f (A) can be expressed as a polynomial in A of degree less than n = 2.
Here, f (λ) = λπ , so we write:
Aπ = αA + βI
The eigenvalues must also satisfy this relationship:
λπ1 = αλ1 + β =⇒ 2π = 2α + β
λπ2 = αλ2 + β =⇒ 5π = 5α + β

3. Solve the system for α and β: Subtracting the first equation from the second:
5π − 2π
5π − 2π = (5α − 2α) + (β − β) = 3α =⇒ α =
3
Substituting α back into the first equation:
5 − 2π 3 · 2π − 2 · 5π + 2 · 2π 5 · 2π − 2 · 5π
 π 
β = 2 − 2α = 2 − 2
π π
= =
3 3 3

4. Substitute α and β into Aπ = αA + βI:


5 − 2π 5 · 2π − 2 · 5π
" # " #
4 2 1 0
 π 
A =
π
+
3 1 3 3 0 1
1 4(5π − 2π ) + (5 · 2π − 2 · 5π )
" #
2(5π − 2π )
=
3 (5 − 2 )
π π 3(5 − 2 ) + (5 · 2π − 2 · 5π )
π π

1 (4 · 5π − 2 · 5π ) + (−4 · 2π + 5 · 2π )
" #
2(5π − 2π )
=
3 (5 − 2 )
π π (3 · 5 − 2 · 5π ) + (−3 · 2π + 5 · 2π )
π

1 2 · 5π + 2π 2(5π − 2π )
" #
=
3 5π − 2π 5π + 2 · 2π

Numerically, using π ≈ 3.14159: 2π ≈ 8.825, 5π ≈ 156.993.


1 2(156.993) + 8.825 2(156.993 − 8.825) 1 322.811 296.336
" # " # " #
π 107.60 98.78
A ≈ ≈ ≈
3 156.993 − 8.825 156.993 + 2(8.825) 3 148.168 174.643 49.39 58.21

(Slight difference from original due to rounding or π value used).

Using the Cayley-Hamilton theorem, Aπ is:

1 2 · 5π + 2π 2(5π − 2π )
" # " #
107.60 98.78
A =
π

3 5 −2π π 5 +2·2
π π 49.39 58.21

4
Q2: Numerical Methods Analysis
(a) Finding Extrema Points Using Newton-Raphson Method
Given the function F (x) = x sin x + ex . Extrema occur where F ′ (x) = 0. We need the first and
second derivatives:
d
F ′ (x) = (x sin x + ex ) = (1) sin x + x(cos x) + ex = sin x + x cos x + ex
dx
d
F ′′ (x) = (sin x + x cos x + ex ) = cos x + [(1) cos x + x(− sin x)] + ex = 2 cos x − x sin x + ex
dx
The Newton-Raphson iteration for finding roots of F ′ (x) is:

F ′ (xn )
xn+1 = xn −
F ′′ (xn )

Minimum in [-1, 0] (3 iterations)


Initial guess: x0 = −0.5. We need F ′ (xn ) and F ′′ (xn ) at each step.
Iteration (n) xn F ′ (xn ) F ′′ (xn )
0 −0.5000 −0.3117 2.1219
1 0.0253 2.4570
2 0.0002 2.4358
3 ≈0 2.4356

The minimum occurs at xmin ≈ −0.3635. The function value is F (−0.3635) ≈


(−0.3635) sin(−0.3635) + e−0.3635 ≈ 0.1296 + 0.6952 = 0.8248.

Approximate minimum point: Pmin ≈ (−0.3635, 0.8248)

Maximum in [-2.5, -1.5] (3 iterations)


Initial guess: x0 = −2.0.

Iteration (n) xn F ′ (xn ) F ′′ (xn )


0 −2.0000 0.0582 −2.5155
1 0.0009 −2.4678
2 ≈0 −2.4669
3 - -

The maximum occurs at xmax ≈ −1.9765. The function value is F (−1.9765) ≈


(−1.9765) sin(−1.9765) + e −1.9765 ≈ 1.8164 + 0.1385 = 1.9549.

Approximate maximum point: Pmax ≈ (−1.9765, 1.9549)

(b) Trapezoidal Rule Integration


Z b Z −0.3635
Compute I = F (x) dx = (x sin x + ex ) dx using n = 5 subintervals.
a −1.9765

Parameters

Limits: a = −1.9765, b = −0.3635. Number of subintervals: n = 5. Step size: h = b−a


n =
−0.3635−(−1.9765)
5 = 1.6130
5 = 0.3226.

5
Function Values at Nodes
The nodes are xi = a + ih for i = 0, 1, . . . , 5.

i xi F (xi ) = xi sin xi + exi


0 −1.9765 1.9549
1 −1.6539 1.8408
2 −1.3313 1.5572
3 −1.0087 1.2182
4 −0.6861 0.9380
5 −0.3635 0.8248

Trapezoidal Formula

The formula is I ≈ h2 [F (x0 ) + 2(F (x1 ) + F (x2 ) + F (x3 ) + F (x4 )) + F (x5 )].

0.3226
I≈ [1.9549 + 2(1.8408 + 1.5572 + 1.2182 + 0.9380) + 0.8248]
2
= 0.1613[1.9549 + 2(5.5542) + 0.8248]
= 0.1613[1.9549 + 11.1084 + 0.8248]
= 0.1613[13.8881]
≈ 2.2398

The approximate value of the integral using the Trapezoidal rule with n = 5 is:
Z −0.3635
(x sin x + ex ) dx ≈ 2.2398
−1.9765

6
Q3: Fourier Series
Given the function f (t) = t sin t defined for |t| ≤ π and periodic with period T = 2π. The
fundamental frequency is ω0 = 2πT = 1.

(a) a0 via Simpson’s Rule (n = 4)


The DC component (average value) of the Fourier series is a0 . Since f (t) is even, we calculate:
1 1 2 1
Z T /2 Z π Z π Z π
a0 = f (t) dt = t sin t dt = t sin t dt = t sin t dt
T −T /2 2π −π 2π 0 π 0

We approximate the integral I = 0π t sin t dt using Simpson’s 1/3 rule with n = 4 subintervals.
R

Step size: h = π−0 4 = 4 . Nodes: t0 = 0, t1 = π/4, t2 = π/2, t3 = 3π/4, t4 = π. Function values


π

yi = f (ti ) = ti sin ti :

i ti yi = ti sin ti
0 0.0000 0.0000
1 π/4 ≈ 0.7854 0.5554
2 π/2 ≈ 1.5708 1.5708
3 3π/4 ≈ 2.3562 1.6661
4 π ≈ 3.1416 0.0000

Simpson’s rule formula: I ≈ h3 [y0 + 4y1 + 2y2 + 4y3 + y4 ].


π/4
I≈ [0 + 4(0.5554) + 2(1.5708) + 4(1.6661) + 0]
3
π
= [0 + 2.2216 + 3.1416 + 6.6644 + 0]
12
π
= [12.0276] ≈ 3.1488
12
Now, find a0 :
1 3.1488
a0 =
I≈ ≈ 1.0023
π π
(Note: The exact value of the integral is π, so a0 = 1. Simpson’s rule gives a good approximation.)

Using Simpson’s rule with n = 4, the DC component is approximated as:

a0 ≈ 1.0023

(b) Full Fourier Series Expansion


Since f (t) = t sin t is an even function (f (−t) = (−t) sin(−t) = (−t)(− sin t) = t sin t = f (t)), its
Fourier series contains only cosine terms (bn = 0 for all n).
∞ ∞
f (t) = a0 + an cos(nω0 t) = a0 + an cos(nt)
X X

n=1 n=1

We already know the exact value a0 = 1
π 0 t sin t dt = 1. The coefficients an for n ≥ 1 are given
by:
2 2 2
Z T /2 Z π Z π
an = f (t) cos(nω0 t) dt = t sin t cos(nt) dt = t sin t cos(nt) dt
T −T /2 2π −π π 0

Using the product-to-sum identity sin A cos B = 12 [sin(A + B) + sin(A − B)] with A = t, B = nt:
2 1
Z π
an = t · [sin((1 + n)t) + sin((1 − n)t)] dt
π 0 2

7
1
Z π
an = [t sin((n + 1)t) − t sin((n − 1)t)] dt
π 0

We use the integration by parts result: t sin(kt) dt = − t cos(kt) + sin(kt)


+ C. The definite
R
iπ k k2
k
h
− t cos(kt) sin(kt)
− π cos(kπ)
− (0 + 0) = − π(−1)
sin(kπ)

integral is 0 t sin(kt) dt = + k = k2
+ k kk2
for
0
integer k ̸= 0.
Case n = 1: The second term involves sin(0), so the integral is 0π t sin(0) dt = 0.
R

1 1 1 1
" #
π(−1)2
Z π
π
 
a1 = t sin(2t) dt = − = − =−
π 0 π 2 π 2 2

Case n ≥ 2: Both k = n + 1 and k = n − 1 are non-zero integers.


1 π π
Z Z 
an = t sin((n + 1)t) dt − t sin((n − 1)t) dt
π 0 0
1
" !#
π(−1)n+1 π(−1)n−1
= − − −
π n+1 n−1
(−1)n+1 (−1)n−1
=− +
n+1 n−1
−(−1)(−1) n (−1)−1 (−1)n
= + (since (−1)n+1 = −(−1)n , (−1)n−1 = −(−1)n )
n+1 n−1
(−1)n (−1)n
= −
n+1 n−1
1 1 (n − 1) − (n + 1)
   
= (−1)n − = (−1)n
n+1 n−1 (n + 1)(n − 1)

−2

−2(−1) n
= (−1)n =
n −1
2 n2 − 1
Combining the terms:

f (t) = a0 + a1 cos(t) + an cos(nt)
X

n=2

1 −2(−1)n
f (t) = 1 − cos t + cos(nt)
X
2 n=2
n2 − 1

The full Fourier series expansion for f (t) = t sin t over |t| ≤ π is:

1 (−1)n
f (t) = 1 − cos t − 2 cos(nt)
X
2 n=2
n2 − 1

8
Q4: Convolution Using Laplace Transform
A system consists of two subsystems.

• Subsystem 1 step response: s1 (t) = e−3t (1 − t)u(t)

• Subsystem 2 impulse response: h2 (t) = sin(3t)u(t)

• Total impulse response: htotal (t) = h1 (t) + h2 (t)

• Relationship: h1 (t) = dt s1 (t)


d
(Impulse response is derivative of step response)

The input to the total system is x(t) = u(t) (unit step function). Find the output y(t).

Step 1: Derive Impulse Response h1 (t)


d −3t
h1 (t) = [e (1 − t)] = (−3e−3t )(1 − t) + (e−3t )(−1) = −3e−3t + 3te−3t − e−3t = (3t − 4)e−3t
dt
So, h1 (t) = (3t − 4)e−3t u(t).

Step 2: Find Total Impulse Response htotal (t)


htotal (t) = h1 (t) + h2 (t) = (3t − 4)e−3t u(t) + sin(3t)u(t)

Step 3: Find Transfer Function Htotal (s)


Take the Laplace transform of htotal (t):

Htotal (s) = L{htotal (t)} = L{(3t − 4)e−3t } + L{sin(3t)}


= 3L{te−3t } − 4L{e−3t } + L{sin(3t)}
1 1 3
     
=3 −4 + 2
(s + 3)2 s+3 s + 32
3 4 3
= − + 2
(s + 3) 2 s+3 s +9

Step 4: Calculate Output Y (s) in Laplace Domain


The input is x(t) = u(t), so X(s) = L{u(t)} = 1s . The output is Y (s) = X(s)Htotal (s).

1 3 4 3 3 4 3
 
Y (s) = − + 2 = − +
s (s + 3) 2 s+3 s +9 s(s + 3) 2 s(s + 3) s(s + 9)
2

Step 5: Partial Fraction Decomposition (PFD)


We decompose each term. Term 1: 3
s(s+3)2
= A
s + B
s+3 + C
(s+3)2

• A= 3
(s+3)2 s=0
= 3
9 = 1
3

• C= 3
s s=−3 = 3
−3 = −1

• 3 = A(s + 3)2 + Bs(s + 3) + Cs. Equating s2 coeffs: 0 = A + B =⇒ B = −A = −1/3.


1/3 1/3
So, 3
s(s+3)2
= s − s+3− (s+3)2 .
1

Term 2: 4
− s(s+3) = − As + s+3B

• A= 4
s+3 s=0 = 4
3

9
• B= 4
s s=−3 = 4
−3 = − 43
 
4/3 4/3
So, − s(s+3)
4
=− s − s+3 = − 4/3
s +
4/3
s+3 .
Term 3: 3
s(s2 +9)
= As + Bs+C
s2 +9

• A= 3
s2 +9 s=0
= 3
9 = 1
3

• 3 = A(s2 + 9) + (Bs + C)s. Equating s2 coeffs: 0 = A + B =⇒ B = −A = −1/3.


Equating s coeffs: 0 = C.

So, s(s23+9) = 1/3 (1/3)s


s − s2 +9 .
Combine all terms for Y (s):

1/3 1/3 1 4/3 4/3 1/3 1/3s


     
Y (s) = − − + − + + − 2
s s + 3 (s + 3) 2 s s+3 s s +9
1 4 1 1 1 4 1 1 1 s
   
= − + + − + − −
3 3 3 s 3 3 s + 3 (s + 3)2 3 s2 + 9
2/3 1 1 1 s
=− + − −
s s + 3 (s + 3) 2 3 s2 + 9

Step 6: Inverse Laplace Transform


Find y(t) = L−1 {Y (s)}.

2/3 1 1 1 s
y(t) = L−1 {− } + L−1 { } − L−1 { } − L−1 { 2 }
s s+3 (s + 3) 2 3s +9
2 1
= − u(t) + e−3t u(t) − te−3t u(t) − cos(3t)u(t)
3  3
2 −3t 1
= − + (1 − t)e − cos(3t) u(t)
3 3

The system output for input x(t) = u(t) is:

2 1
 
y(t) = − + (1 − t)e−3t − cos(3t) u(t)
3 3

Part (b): Total Step Response stotal (t)


The total step response is the integral of the total impulse response, or equivalently, the output
y(t) calculated above when the input is a unit step u(t).
Z t
stotal (t) = htotal (τ ) dτ = y(t)|x(t)=u(t)
0

Alternatively, integrate htotal (t):


Z
stotal (t) = [(3t − 4)e−3t + sin(3t)] dt

10
Integral of sin(3t) is − 13 cos(3t). Integral of (3t − 4)e−3t requires integration by parts: u dv =
R

uv − v du. Let u = 3t − 4 =⇒ du = 3 dt. Let dv = e−3t dt =⇒ v = − 13 e−3t .


R

1 1
Z Z
(3t − 4)e−3t dt = (3t − 4)(− e−3t ) − (− e−3t )(3 dt)
3 3
1
Z
= − (3t − 4)e−3t + e−3t dt
3
1 1
= − (3t − 4)e−3t − e−3t
3  3
3t − 4 1 −3t + 4 − 1 3 − 3t
   
= e−3t − − = e−3t = e−3t = (1 − t)e−3t
3 3 3 3

Combining the integrals (and adding a constant of integration K):


1
stotal (t) = (1 − t)e−3t − cos(3t) + K
3
Since the step response should start at 0 for t = 0 (assuming causality and zero initial conditions
for the integration), we find K. stotal (0) = (1−0)e0 − 13 cos(0)+K = 1− 13 +K = 0 =⇒ K = − 23 .
Thus, the step response is stotal (t) = (1 − t)e−3t − 13 cos(3t) − 23 . This matches the result from
the Laplace transform method.

The total step response of the system is:


2 1
 
stotal (t) = − + (1 − t)e−3t − cos(3t) u(t)
3 3

11
Q5: Fourier Transform
Given the function f (t) for 0 ≤ t ≤ π and f (t) = 0 otherwise:
1
 
f (t) = 2 exp ln(4 cos2 t + 8t cos t + 4t2 )
2

Step 1: Simplify the Function f (t)



Using properties exp(ln(x)) = x and 1
2 ln(x) = ln( x):
 p 
f (t) = 2 exp ln 4 cos2 t + 8t cos t + 4t2
q
= 2 4(cos2 t + 2t cos t + t2 )
q
= 2 4(cos t + t)2
= 2 · 2| cos t + t|
For t ∈ [0, π], cos t ranges from 1 to -1. If t ∈ [0, π/2], cos t ≥ 0, so cos t + t > 0. If t ∈ (π/2, π],
cos t < 0. We need to check if cos t + t can be negative. Let g(t) = cos t + t. g ′ (t) = − sin t + 1.
Since sin t ≤ 1, g ′ (t) ≥ 0 for t ∈ [0, π]. The minimum value of g(t) occurs at t = 0, where
g(0) = cos 0 + 0 = 1. Therefore, cos t + t > 0 for all t ∈ [0, π]. So, | cos t + t| = cos t + t.
f (t) = 4(cos t + t) for 0 ≤ t ≤ π, and 0 otherwise.

Step 2: Calculate the Fourier Transform F (ω)


R∞
The Fourier Transform is defined as F (ω) = −∞ f (t)e
−jωt dt.

Z π Z π Z π
−jωt −jωt
F (ω) = 4(cos t + t)e dt = 4 cos t e dt +4 t e−jωt dt
0 0 0
| {z } | {z }
I1 I2

Solving Integral I1
ejt +e−jt
Use Euler’s formula: cos t = 2 .
e + e−jt −jωt 1 π j(1−ω)t
Z π jt Z
I1 = e dt = (e + e−j(1+ω)t ) dt
0 2 2 0

Case ω 2 ̸= 1:

1 ej(1−ω)t e−j(1+ω)t
"
I1 = +
2 j(1 − ω) −j(1 + ω) 0
1 ej(1−ω)π
−1 e −1
" #
−j(1+ω)π
= −
2j 1−ω 1+ω
1 (ejπ e−jωπ ) −1 (e−jπ e−jωπ ) − 1
" #
= − (since e±jπ = −1)
2j 1−ω 1+ω
1 −e−jωπ − 1 −e−jωπ − 1
" #
= −
2j 1−ω 1+ω
−(1 + e−jωπ ) 1 1
 
= −
2j 1−ω 1+ω
−(1 + e −jωπ ) (1 + ω) − (1 − ω)
 
=
2j 1 − ω2
−(1 + e−jωπ ) 2ω −ω(1 + e−jωπ ) jω(1 + e−jωπ )
 
= = =
2j 1 − ω2 j(1 − ω 2 ) 1 − ω2

12
Case ω = 1: I1 = 1 Rπ −2jt ) dt = 1 [π + e−2jπ −1 ]
2 0 (1 + e = 2 [π + 0] =2 . Case ω =
1 π
2 −2j −1:
2jπ jω(1+e−jωπ )
I1 = 12 0π (e2jt + 1) dt = 12 [ e 2j−1 + π] = 12 [0 + π] = π2 . Note that limω→±1 yields
R
1−ω 2
π/2
using L’Hopital’s rule.

Solving Integral I2
Use integration by parts: u dv = uv − v du. Let u = t =⇒ du = dt. Let dv = e−jωt dt =⇒
R R
−jωt
v = e−jω . Case ω ̸= 0:

e−jωt e
" Z π −jωt
I2 = t − dt
−jω 0 0 −jω
1
!
πe−jωπ
Z π
= −0 + e−jωt dt
−jω jω 0

jπe−jωπ 1 e
"
−jωt
= +
ω jω −jω 0
jπe−jωπ 1
= + 2 (e−jωπ − 1)
ω ω
Rπ 2 π2 jπ(1−jωπ+...)
Case ω = 0: I2 = 0 t dt = [ t2 ]π0 =
2 . Note that limω→0 I2 = limω→0 [ ω +
(1−jωπ−ω 2 π 2 /2+...)−1 −jωπ−ω 2 π 2 /2+... π2 π2
ω2
] = jπ
limω→0 [ ω + π + ... +
2
ω2

] = limω→0 [ ω + π − ω − 2 ] = 2 .
2 jπ

Limit matches.

Combine Results for F (ω)


For ω ̸= 0, ±1:

jω(1 + e−jωπ ) jπe−jωπ + e−jωπ − 1


F (ω) = 4I1 + 4I2 = 4 + 4
1 − ω2 ω2
For ω = ±1:

F (±1) = 4I1 + 4I2 = 4(π/2) + 4(jπe∓jπ + e∓jπ − 1) = 2π + 4(−jπ − 1 − 1) = 2π − 8 − 4jπ

For ω = 0:
Z π
F (0) = 4 (cos t + t) dt = 4[sin t + t2 /2]π0 = 4[(0 + π 2 /2) − (0 + 0)] = 2π 2
0

(There seems to be a calculation error in the original prompt’s special cases). Let’s recheck
F (0) from the combined formula limit - requires careful L’Hopital. Direct integration is safer.
I1 (ω = 0) = 0π cos tdt = [sin t]π0 = 0. I2 (ω = 0) = π 2 /2. So F (0) = 4(0) + 4(π 2 /2) = 2π 2 .
R

The Fourier Transform is:


jω(1 + e−jωπ ) jπe−jωπ + e−jωπ − 1

4 + 4 if ω ̸= 0, ±1


1 − ω2 ω2




2π − 8 − 4jπ if ω = 1

F (ω) =
2π − 8 + 4jπ if ω = −1





 2
2π if ω = 0

13
Q6: Inverse Laplace Transform
Find g(t) = L−1 {G(s)} where:

(s5 − 16s)(s + 4)
G(s) =
(s5 − 12s3 − 64s)(s3 − 64)

Step 1: Factorize Numerator and Denominator


Numerator N (s):

N (s) = (s5 − 16s)(s + 4) = s(s4 − 16)(s + 4)


= s(s2 − 4)(s2 + 4)(s + 4)
= s(s − 2)(s + 2)(s2 + 4)(s + 4)

Denominator D(s):

D(s) = (s5 − 12s3 − 64s)(s3 − 64)


√ √ √
= s(s4 − 12s2 − 64) · (s − 64)(s2 + 64s + ( 64)2 ) (Sum/diff of cubes)
3 3 3

= s(s − 12s − 64) · (s − 4)(s + 4s + 16)


4 2 2


12± 144−4(1)(−64)
Factor the quartic s4 − 12s2 − 64. Let u = s2 , then u2 − 12u − 64. Roots are 2 =
√ √
12± 144+256
2 = 12± 400
2 = 12±20
2 . So u = 16 or u = −4. Thus, s 4 − 12s2 − 64 = (s2 − 16)(s2 + 4) =
(s − 4)(s + 4)(s2 + 4). Substitute back into D(s):

D(s) = s[(s − 4)(s + 4)(s2 + 4)] · (s − 4)(s2 + 4s + 16)


= s(s − 4)2 (s + 4)(s2 + 4)(s2 + 4s + 16)

Simplify G(s):
s(s − 2)(s + 2)(s2 + 4)(s + 4)
G(s) =
s(s − 4)2 (s + 4)(s2 + 4)(s2 + 4s + 16)
Cancel common factors s, (s + 4), and (s2 + 4) (assuming s ̸= 0, −4 and s2 ̸= −4).

(s − 2)(s + 2) s2 − 4
G(s) = =
(s − 4)2 (s2 + 4s + 16) (s − 4)2 (s2 + 4s + 16)

Step 2: Partial Fraction Decomposition


We need to decompose:

s2 − 4 A B Cs + D
G(s) = = + + 2
(s − 4) (s + 4s + 16)
2 2 s − 4 (s − 4)2 s + 4s + 16
Multiply by the denominator:

s2 − 4 = A(s − 4)(s2 + 4s + 16) + B(s2 + 4s + 16) + (Cs + D)(s − 4)2

Find B (Heaviside cover-up for highest power): Set s = 4.

42 − 4 = A(0) + B(42 + 4(4) + 16) + (4C + D)(0)2


12 1
16 − 4 = B(16 + 16 + 16) =⇒ 12 = 48B =⇒ B = =
48 4
Equate coefficients: Expand the right side. s − 4 = A(s + 4s + 16s − 4s2 − 16s − 64) +
2 3 2

B(s2 + 4s + 16) + (Cs + D)(s2 − 8s + 16) s2 − 4 = A(s3 − 64) + B(s2 + 4s + 16) + (Cs3 − 8Cs2 +
16Cs + Ds2 − 8Ds + 16D) Group by powers of s:

14
• s3 : 0 = A + C

• s2 : 1 = B − 8C + D

• s1 : 0 = 4B + 16C − 8D

• s0 : −4 = −64A + 16B + 16D

Substitute B = 1/4 and C = −A:

• 1 = 1/4 − 8(−A) + D =⇒ 1 = 1/4 + 8A + D =⇒ 3/4 = 8A + D (Eq 1)

• 0 = 4(1/4) + 16(−A) − 8D =⇒ 0 = 1 − 16A − 8D =⇒ 16A + 8D = 1 (Eq 2)

• −4 = −64A + 16(1/4) + 16D =⇒ −4 = −64A + 4 + 16D =⇒ −8 = −64A + 16D =⇒


−1 = −8A + 2D (Eq 3)

From (Eq 1), D = 3/4−8A. Substitute into (Eq 3): −1 = −8A+2(3/4−8A) = −8A+3/2−16A =
−24A + 3/2 −1 − 3/2 = −24A =⇒ −5/2 = −24A =⇒ A = 48 5
. Then C = −A = − 485
. And
D = 3/4 − 8(5/48) = 3/4 − 40/48 = 3/4 − 5/6 = (9 − 10)/12 = −1/12. Check with (Eq 2):
16(5/48) + 8(−1/12) = 5/3 − 8/12 = 5/3 − 2/3 = 3/3 = 1. Correct. So the decomposition is:

5/48 1/4 −5/48s − 1/12


G(s) = + + 2
s − 4 (s − 4)2 s + 4s + 16

Step 3: Inverse Laplace Transform


n o n o
5/48 1/4
We find L−1 for each term. Term 1: L−1 s−4 = 48 e
5 4t
Term 2: L−1 (s−4)2
= 14 te4t Term
3: Need to manipulate −5/48s−1/12
s2 +4s+16√
. Complete the square in the denominator: s2 + 4s + 16 =
(s2 + 4s + 4) + 12 = (s + 2)2 + (2 3)2 . We need to express the numerator in terms of (s + 2).
5
− 48 1
s − 12 5
− 48 (s + 2) + 10 − 1
√ = 48
√ 12
(s + 2)2 + (2 3)2 (s + 2)2 + (2 3)2
− 5 (s + 2) + 10 − 4
= 48 48
√ 48
(s + 2)2 + (2 3)2
5
− 48 (s + 2) + 48
6
= √
(s + 2)2 + (2 3)2
5 s+2 1 1
=− √ + √
48 (s + 2) + (2 3)
2 2 8 (s + 2) + (2 3)2
2

√ √
Now match the sine term: 1 1 √
8 (s+2)2 +(2 3)2 = 1 √1 2 3√
8 2 3 (s+2)2 +(2 3)2 = 1√ 2 3√
16 3 (s+2) +(2 3)2
2 =
√ √
48 (s+2)2 +(2 3)2 . The inverse transform of Term 3 is:
3 2 3√


−1 5 −2t √ 3 −2t √
L {Term 3} = − e cos(2 3t) + e sin(2 3t)
48 48

Step 4: Combine Results for g(t)



5 4t 1 4t 5 −2t √ 3 −2t √
g(t) = e + te − e cos(2 3t) + e sin(2 3t)
48 4 48 48
Factor out 1/48:
1 h 4t √ √ √ i
g(t) = 5e + 12te4t + e−2t (−5 cos(2 3t) + 3 sin(2 3t))
48

15
The inverse Laplace transform is:
1 h √ √ √ i
g(t) = (5 + 12t)e4t + e−2t ( 3 sin(2 3t) − 5 cos(2 3t)) u(t)
48

16
Q7: ODE via Laplace Transforms
Solve the ODE with zero initial conditions (y(0) = 0, y ′ (0) = 0):
1 1
 
y ′′ + 2y ′ + 2y = e−t sin2 t + sin 2t + u(t)
2 2

Step 1: Simplify the Right-Hand Side (RHS) f (t)


Use identities sin2 t = 1−cos 2t
2 and sin 2t = 2 sin t cos t.
1 − cos 2t 1 1
 
−t
f (t) = e + (2 sin t cos t) + u(t)
2 2 2
1 1 1
= e−t − e−t cos 2t + e−t sin t cos t + u(t)
2 2 2
Wait, the original prompt used 1
2 sin 2t. Let’s stick to that:
1 − cos 2t 1 1
 
−t
f (t) = e + sin 2t + u(t)
2 2 2
1 1 1 1
= e−t − e−t cos 2t + e−t sin 2t + u(t)
2 2 2 2

Step 2: Take Laplace Transform of the ODE


Let Y (s) = L{y(t)} and F (s) = L{f (t)}. L{y ′′ } = s2 Y (s) − sy(0) − y ′ (0) = s2 Y (s) L{y ′ } =
sY (s) − y(0) = sY (s) L{y} = Y (s) Transforming the LHS: L{y ′′ + 2y ′ + 2y} = (s2 + 2s + 2)Y (s).
Transforming the RHS, F (s):
1 1
L{ e−t } =
2 2(s + 1)
1 1 s+1 s+1
L{− e−t cos 2t} = − =−
2 2 (s + 1) + 2
2 2 2((s + 1)2 + 4)
1 1 2 1
L{ e−t sin 2t} = =
2 2 (s + 1) + 2
2 2 (s + 1)2 + 4
1 1
L{ u(t)} =
2 2s
So,
1 s+1 1 1
F (s) = − + +
2(s + 1) 2((s + 1) + 4) (s + 1) + 4 2s
2 2

1 −(s + 1) + 2 1
= + +
2(s + 1) 2((s + 1)2 + 4) 2s
1 1−s 1
= + +
2(s + 1) 2(s2 + 2s + 5) 2s

Step 3: Solve for Y (s)


The transformed ODE is (s2 + 2s + 2)Y (s) = F (s). Note that s2 + 2s + 2 = (s + 1)2 + 1.
F (s) 1 1 1−s 1
 
Y (s) = 2 = + +
s + 2s + 2 (s + 1) + 1 2(s + 1) 2(s + 2s + 5) 2s
2 2

Step 4: Partial Fraction Decomposition (Complex)


This decomposition looks identical to the one in the original prompt. Let’s trust
 those results 
for the decomposition of each term within Y (s). Term 1: 2(s+1)((s+1)2 +1) = 2 s+1
1 1 1 s+1
− (s+1)2 +1

17
Term 2: 1−s
2((s+1)2 +1)(s2 +2s+5)
= 2((s+1)2 +1)((s+1)
1−s
2 +4) Let X = (s + 1) . 2(X+1)(X+4) = X+1 + X+4 .
2 1−s A B

A = 2(X+4)
1−s
= 2(3)
1−s
= 1−s
6 . B = 2(X+1) X=−4 = 2(−3) = − 6 . So Term 2 = 6((s+1)2 +1) −
1−s 1−s 1−s 1−s
X=−1  
−(s+1)+2 −(s+1)+2
1−s
6((s+1)2 +4)
= −
6((s+1)2 +1) 6((s+1)2 +4)
= − 1 s+1
+ 1 1
6 ((s+1)2 +1) 3 ((s+1)2 +1) − − 1 s+1
6 ((s+1)2 +4) + 1 1
3 ((s+1)2 +4)
= − 16 (s+1)
s+1
2 +1 + 1 1
2 + 1 s+1
6 (s+1)2 +4 − 1 1
3 (s+1)2 +4 Term 3: 1
2s((s+1)2 +1)
= 1
2s(s2 +2s+2)
=
  3 (s+1) +1
1 1/2 1/2s+1 (s+1)+1
s − s2 +2s+2 = 4s − 4((s+1)2 +1) = 4s − 4((s+1)2 +1) = 4s − 4 (s+1)2 +1 − 4 (s+1)2 +1
1 s+2 1 1 1 s+1 1 1
2

Step 5: Combine Terms for Y (s)


Add the decomposed terms:
1 1 s+1
 
Y (s) = −
2(s + 1) 2 (s + 1)2 + 1
1 s+1 1 1 1 s+1 1 1
 
+ − + + −
6 (s + 1)2 + 1 3 (s + 1)2 + 1 6 (s + 1)2 + 4 3 (s + 1)2 + 4
1 1 s+1 1 1
 
+ − −
4s 4 (s + 1)2 + 1 4 (s + 1)2 + 1
Group by denominators:
1 1
Y (s) = +
4s 2(s + 1)
1 1 1 s+1
 
+ − − − // Coeff = (-6-2-3)/12 = -11/12
2 6 4 (s + 1)2 + 1
1 1 1
 
+ − // Coeff = (4-3)/12 = 1/12
3 4 (s + 1)2 + 1
1 s+1
+
6 (s + 1)2 + 4
1 1 1 2
− // Need to match sine form: −
3 (s + 1) + 4
2 6 (s + 1)2 + 4
So,
1 1 11 s+1 1 1 1 s+1 1 2
Y (s) = + − + + −
4s 2(s + 1) 12 (s + 1) + 1 12 (s + 1) + 1 6 (s + 1) + 4 6 (s + 1)2 + 4
2 2 2

Step 6: Inverse Laplace Transform


Apply L−1 to each term:
1 1
y(t) = u(t) + e−t u(t)
4 2
11 −t 1 −t
− e cos(t)u(t) + e sin(t)u(t)
12 12
1 1 −t
+ e−t cos(2t)u(t) − e sin(2t)u(t)
6 6
Combine terms with e−t :
1 −t 1 11 1 1 1
 
y(t) = + e − cos t + sin t + cos 2t − sin 2t
4 2 12 12 6 6
(Assuming t ≥ 0, so u(t) = 1).

The solution to the ODE with zero initial conditions is:


1 1 11 1 1 1
 
y(t) = + e−t − cos t + sin t + cos 2t − sin 2t , t≥0
4 2 12 12 6 6

18
Q8: State-Space Analysis Using Laplace Transforms
Given the LTI system ẋ = Ax + Bu, y = Cx with:
" #−1 " # " #
−1 − 23 1 h i 1
A= , B= , C = 2 −1 , u(t) = e −2t
, x(0) = .
0 − 13 1 −1

(a) Find State Vector x(t)


Step 1: Compute Matrix A
" #
−1 −2/3
Let M = . det(M ) = (−1)(−1/3) − (−2/3)(0) = 1/3.
0 −1/3

1 −1/3 2/3
" # " # " #
−1 −1/3 2/3 −1 2
A=M = =3 =
1/3 0 −1 0 −1 0 −3

Step 2: Laplace Transform Solution Formula


The state vector in the Laplace domain is X(s) = (sI − A)−1 [x(0) + BU (s)].

Step 3: Compute Components


Input transform: U (s) = L{e−2t } = s+2 .
1
Resolvent matrix calculation:
" # " # " #
s 0 −1 2 s + 1 −2
sI − A = − =
0 s 0 −3 0 s+3

det(sI − A) = (s + 1)(s + 3).


" 1 2
1
" # #
−1 s+3 2
(sI − A) = = s+1 (s+1)(s+3)
(s + 1)(s + 3) 0 s+1 0 1
s+3

Term involving initial condition and input:

1 1 1 + s+2
" # " # " # " #
1 1 s+3
x(0) + BU (s) = + = = s+2
−1 1 s+2 −1 + s+21 −s−1
s+2

Step 4: Calculate X(s)


" 1 2
#" s+3 #
s+2
X(s) = s+1 (s+1)(s+3)
−(s+1)
0 1
s+3 s+2

1 s+3 2 −(s + 1)
     
X1 (s) = +
s+1 s+2 (s + 1)(s + 3) s+2
s+3 2
= −
(s + 1)(s + 2) (s + 2)(s + 3)
(s + 3)2 − 2(s + 1) s2 + 6s + 9 − 2s − 2 s2 + 4s + 7
= = =
(s + 1)(s + 2)(s + 3) (s + 1)(s + 2)(s + 3) (s + 1)(s + 2)(s + 3)

s+3 1 −(s + 1) −(s + 1)


    
X2 (s) = (0) + =
s+2 s+3 s+2 (s + 2)(s + 3)

19
Step 5: Partial Fraction Decomposition
s2 +4s+7
For X1 (s): (s+1)(s+2)(s+3) = A
s+1 + B
s+2 + C
s+3

s2 +4s+7
• A= (s+2)(s+3) s=−1 = 1−4+7
(1)(2) = 4
2 =2

s2 +4s+7
• B= (s+1)(s+3) s=−2 = 4−8+7
(−1)(1) = 3
−1 = −3

s2 +4s+7
• C= (s+1)(s+2) s=−3 = 9−12+7
(−2)(−1) = 4
2 =2

So, X1 (s) = s+1 − s+2 + s+3 .


2 3 2
−(s+1)
For X2 (s): (s+2)(s+3) = s+2 + s+3
D E

−(s+1) −(−1)
• D= s+3 s=−2 = 1 =1

−(s+1) −(−2)
• E= s+2 s=−3 = −1 = −2

So, X2 (s) = 1
s+2 − s+3 .
2

Step 6: Inverse Laplace Transform


x1 (t) = L−1 {X1 (s)} = (2e−t − 3e−2t + 2e−3t )u(t)
x2 (t) = L−1 {X2 (s)} = (e−2t − 2e−3t )u(t)

The state vector is: " #


2e−t − 3e−2t + 2e−3t
x(t) = u(t)
e−2t − 2e−3t

(b) Calculate Output y(t)


Use the output equation y(t) = Cx(t).
" #
h i 2e−t − 3e−2t + 2e−3t
y(t) = 2 −1
e−2t − 2e−3t
= 2(2e−t − 3e−2t + 2e−3t ) − 1(e−2t − 2e−3t )
= (4e−t − 6e−2t + 4e−3t ) − (e−2t − 2e−3t )
= 4e−t + (−6 − 1)e−2t + (4 + 2)e−3t
= 4e−t − 7e−2t + 6e−3t

The system output is:


y(t) = (4e−t − 7e−2t + 6e−3t )u(t)

(c) Analyze System Stability via Eigenvalues


" #
−1 2
The stability is determined by the eigenvalues of matrix A = . Since A is upper
0 −3
triangular, the eigenvalues are the diagonal entries. Eigenvalues: λ1 = −1, λ2 = −3. Both
eigenvalues have negative real parts (Re{λi } < 0).

The system is asymptotically stable as all eigenvalues (λ = −1, −3) lie in the left half
of the complex plane.

20
Q9: Numerical Methods - RK4
Solve the Initial Value Problem (IVP) using the Runge-Kutta 4th order (RK4) method:

y ′ = x(t)yet + h(t), y(0) = 1

Find y(0.5) using step size h = 0.1.

Step 1: Determine Functions x(t) and h(t)


Given L{x(t)} = 1
(s+1)2 +1
. This is the transform of e−at sin(bt) with a = 1, b = 1.

x(t) = e−t sin t


t3
Given step response s(t) = 3 − e−t . The impulse response h(t) is the derivative:

d d 3t2
!
t3
h(t) = s(t) = − e−t = − (−e−t ) = t2 + e−t
dt dt 3 3

Step 2: Formulate the ODE


Substitute x(t) and h(t) into the ODE y ′ = f (t, y):

y ′ = (e−t sin t)yet + (t2 + e−t )

y ′ = y sin t + t2 + e−t
So, f (t, y) = y sin t + t2 + e−t . Initial condition: y(0) = 1. Step size h = 0.1. We need 5 steps to
reach t = 0.5.

Step 3: RK4 Implementation


The RK4 formulas are:

k1 = hf (tn , yn )
k2 = hf (tn + h/2, yn + k1 /2)
k3 = hf (tn + h/2, yn + k2 /2)
k4 = hf (tn + h, yn + k3 )
1
yn+1 = yn + (k1 + 2k2 + 2k3 + k4 )
6
• Step 1: t0 = 0, y0 = 1 f (0, 1) = 1 sin 0 + 02 + e0 = 1 k1 = 0.1 × 1 = 0.1 f (0.05, 1 + 0.1/2) =
f (0.05, 1.05) = 1.05 sin 0.05 + 0.052 + e−0.05 ≈ 1.05(0.04998) + 0.0025 + 0.95123 ≈ 1.00621
k2 = 0.1 × 1.00621 = 0.100621 f (0.05, 1 + 0.100621/2) = f (0.05, 1.05031) = 1.05031 sin 0.05 +
0.052 + e−0.05 ≈ 1.05031(0.04998) + 0.0025 + 0.95123 ≈ 1.00622 k3 = 0.1 × 1.00622 = 0.100622
f (0.1, 1 + 0.100622) = f (0.1, 1.10062) = 1.10062 sin 0.1 + 0.12 + e−0.1 ≈ 1.10062(0.09983) + 0.01 +
0.90484 ≈ 1.02472 k4 = 0.1 × 1.02472 = 0.102472 y1 = 1 + 16 (0.1 + 2(0.100621) + 2(0.100622) +
0.102472) ≈ 1 + 0.100996 = 1.100996

• Step 2: t1 = 0.1, y1 ≈ 1.10100 (Using rounded value for next step) f (0.1, 1.10100) ≈
1.10100(0.09983) + 0.01 + 0.90484 ≈ 1.02476 k1 = 0.1 × 1.02476 = 0.102476 f (0.15, 1.10100 +
0.102476/2) = f (0.15, 1.15224) = 1.15224 sin 0.15 + 0.152 + e−0.15 ≈ 1.15224(0.14944) +
0.0225 + 0.86071 ≈ 1.05543 k2 = 0.1 × 1.05543 = 0.105543 f (0.15, 1.10100 + 0.105543/2) =
f (0.15, 1.15377) ≈ 1.05566 k3 = 0.1 × 1.05566 = 0.105566 f (0.2, 1.10100 + 0.105566) =
f (0.2, 1.20657) = 1.20657 sin 0.2 + 0.22 + e−0.2 ≈ 1.20657(0.19867) + 0.04 + 0.81873 ≈ 1.09843
k4 = 0.1×1.09843 = 0.109843 y2 = 1.10100+ 16 (0.102476+2(0.105543)+2(0.105566)+0.109843) ≈
1.10100 + 0.105753 = 1.206753

21
• Step 3: t2 = 0.2, y2 ≈ 1.20675 f (0.2, 1.20675) ≈ 1.09847 k1 = 0.109847 f (0.25, 1.20675 +
0.109847/2) = f (0.25, 1.26167) ≈ 1.15348 k2 = 0.115348 f (0.25, 1.20675 + 0.115348/2) =
f (0.25, 1.26442) ≈ 1.15416 k3 = 0.115416 f (0.3, 1.20675 + 0.115416) = f (0.3, 1.32217) ≈ 1.22155
k4 = 0.122155 y3 = 1.20675 + 16 (0.109847 + 2(0.115348) + 2(0.115416) + 0.122155) ≈ 1.20675 +
0.115484 = 1.322234

• Step 4: t3 = 0.3, y3 ≈ 1.32223 f (0.3, 1.32223) ≈ 1.22157 k1 = 0.122157 f (0.35, 1.32223 +


0.122157/2) = f (0.35, 1.38331) ≈ 1.30143 k2 = 0.130143 f (0.35, 1.32223 + 0.130143/2) =
f (0.35, 1.38730) ≈ 1.30311 k3 = 0.130311 f (0.4, 1.32223 + 0.130311) = f (0.4, 1.45254) ≈ 1.39598
k4 = 0.139598 y4 = 1.32223 + 16 (0.122157 + 2(0.130143) + 2(0.130311) + 0.139598) ≈ 1.32223 +
0.130438 = 1.452668

• Step 5: t4 = 0.4, y4 ≈ 1.45267 f (0.4, 1.45267) ≈ 1.39605 k1 = 0.139605 f (0.45, 1.45267 +


0.139605/2) = f (0.45, 1.52247) ≈ 1.50236 k2 = 0.150236 f (0.45, 1.45267 + 0.150236/2) =
f (0.45, 1.52779) ≈ 1.50467 k3 = 0.150467 f (0.5, 1.45267 + 0.150467) = f (0.5, 1.60314) ≈ 1.62512
k4 = 0.162512 y5 = 1.45267 + 16 (0.139605 + 2(0.150236) + 2(0.150467) + 0.162512) ≈ 1.45267 +
0.150593 = 1.603263

Using RK4 with h = 0.1, the approximate value of y(0.5) is:

y(0.5) ≈ 1.6033

22
Q10: Frequency Response
An LTI system has impulse response h(t) = e−8t u(t). The input signal is:
πt
 
x(t) = 10 − 5 sin + 20 cos(πt)
2
Find the steady-state output y(t).

(a) Frequency Response H(ω)


The frequency response H(ω) is the Fourier Transform of the impulse response h(t).
Z ∞ Z ∞
H(ω) = F{h(t)} = e−8t u(t)e−jωt dt = e−(8+jω)t dt
−∞ 0
#∞
e−(8+jω)t e−8t e−jωt e0
" ! !
H(ω) = = lim −
−(8 + jω) 0
t→∞ −(8 + jω) −(8 + jω)
Since e−8t → 0 as t → ∞ (assuming 8 > 0, which it is), the limit is 0.
1 1
H(ω) = 0 − =
−(8 + jω) 8 + jω

The frequency response of the system is:


1
H(ω) =
8 + jω

(b) System Output Calculation


For an LTI system, if the input is a sum of sinusoids x(t) = k Ak cos(ωk t + ϕk ), the steady-state
P

output is y(t) = k Ak |H(ωk )| cos(ω t + ϕk + ∠H(ωk )). First, express the input x(t) using only
P
 k
cosines: x(t) = 10 + 5 cos πt2 + π
2 + 20 cos(πt). The input consists of three components with
frequencies ω0 = 0, ω1 = π/2, and ω2 = π.

1. DC Component (ω0 = 0): Input term: A0 = 10. Frequency response at ω = 0: H(0) =


8+0 = 8 . |H(0)| = 1/8, ∠H(0) = 0. Output DC component: yDC = A0 H(0) = 10 × 8 = 8 =
1 1 1 10

1.25.

2. Component at ω1 = π/2: Input term: A1 = 5, ϕ1 = π/2. Frequency response at


ω1 = π/2: H(π/2) = 8+jπ/2 1
. Magnitude: |H(π/2)| = |8+jπ/2| 1
= √2 1 = √ 1 2 .
8 +(π/2)2 64+π /4
√ √
64 + (3.1416/2) ≈ 64 + 2.4674 = 66.4674 ≈ 8.1527. |H(π/2)|  ≈ 1/8.1527 ≈
p
2

π/2
0.12266. Phase: ∠H(π/2) = ∠(1) − ∠(8 + jπ/2) = 0 − arctan 8 = − arctan 16π
.


arctan(π/16) ≈ arctan(0.19635) ≈ 0.1940 radians. ∠H(π/2) ≈ −0.1940 rad. Output com-


ponent 1: y1 (t) = A1 |H(ω1 )| cos(ω1 t + ϕ1 + ∠H(ω1 )) y1 (t) ≈ 5(0.12266) cos πt
2 + 2 − 0.1940
π


y1 (t) ≈ 0.6133 cos πt2 + 1.5708 − 0.1940 ≈ 0.6133 cos 2 + 1.3768 .


πt
Alternatively, using


the original sine form: −5 sin(πt/2). The output is −5|H(π/2)| sin(πt/2 + ∠H(π/2)) ≈
−0.6133 sin(πt/2 − 0.1940).

3. Component at ω2 = π: Input term: A2 = 20, ϕ2 = 0. Frequency response at ω2 = π:


H(π) = 8+jπ 1
. Magnitude: |H(π)| = |8+jπ| 1
= √821+π2 = √64+π 1
. 64 + (3.1416)
p
2 ≈
2
√ √
64 + 9.8696 = 73.8696 ≈ 8.5947. |H(π)| ≈ 1/8.5947 ≈ 0.11635. Phase: ∠H(π) =
− arctan 8 . arctan(π/8) ≈ arctan(0.3927) ≈ 0.3745 radians. ∠H(π) ≈ −0.3745 rad. Output
π


component 2: y2 (t) = A2 |H(ω2 )| cos(ω2 t + ϕ2 + ∠H(ω2 )) y2 (t) ≈ 20(0.11635) cos(πt + 0 − 0.3745)


y2 (t) ≈ 2.327 cos(πt − 0.3745).

23
Total System Output
Combine the output components:

y(t) = yDC + y1 (t) + y2 (t)

Using the sine form for y1 (t):

πt
 
y(t) ≈ 1.25 − 0.6133 sin − 0.1940 + 2.327 cos(πt − 0.3745)
2

The steady-state output is approximately:

y(t) ≈ 1.25 − 0.613 sin(1.571t − 0.194) + 2.327 cos(3.142t − 0.374)

The exact form is:


5 5 πt π 20 π
     
y(t) = −p sin − arctan +√ cos πt − arctan
4 64 + π 2 /4 2 16 64 + π 2 8

24
Q11: Fourier Series and Numerical Methods - Interpolation
Interpolate the function f (t) = e1−t through the points P1 (0, e1 ), P2 (0.5, e0.5 ), P3 (1, e0 = 1). Use

e ≈ 2.71828, e ≈ 1.64872. Points are (0, 2.71828), (0.5, 1.64872), (1, 1).

(a) Quadratic Interpolation Using Lagrange Method


The Lagrange interpolating polynomial P2 (t) is given by:
P2 (t) = y1 L1 (t) + y2 L2 (t) + y3 L3 (t)
where Li (t) are the Lagrange basis polynomials. Nodes: t1 = 0, t2 = 0.5, t3 = 1. Values:

y1 = e, y2 = e, y3 = 1.

Basis Polynomials Calculation

(t − t2 )(t − t3 ) (t − 0.5)(t − 1) t2 − 1.5t + 0.5


L1 (t) = = = = 2t2 − 3t + 1
(t1 − t2 )(t1 − t3 ) (0 − 0.5)(0 − 1) 0.5
(t − t1 )(t − t3 ) (t − 0)(t − 1) t2 − t t2 − t
L2 (t) = = = = = −4t2 + 4t
(t2 − t1 )(t2 − t3 ) (0.5 − 0)(0.5 − 1) (0.5)(−0.5) −0.25
(t − t1 )(t − t2 ) (t − 0)(t − 0.5) t2 − 0.5t
L3 (t) = = = = 2t2 − t
(t3 − t1 )(t3 − t2 ) (1 − 0)(1 − 0.5) 0.5

Constructing the Polynomial



P2 (t) = eL1 (t) + eL2 (t) + 1L3 (t)

= e(2t − 3t + 1) + e(−4t2 + 4t) + (2t2 − t)
2
√ √
= (2et2 − 3et + e) + (−4 et2 + 4 et) + (2t2 − t)
√ √
= (2e − 4 e + 2)t2 + (−3e + 4 e − 1)t + e

Numerical Coefficients

Let P2 (t) = At2 +Bt+C. A = 2e−4 e+2 ≈ 2(2.71828)−4(1.64872)+2 = 5.43656−6.59488+2 =

0.84168 B = −3e + 4 e − 1 ≈ −3(2.71828) + 4(1.64872) − 1 = −8.15484 + 6.59488 − 1 = −2.55996
C = e ≈ 2.71828

The quadratic interpolating polynomial using the Lagrange method is:

P2 (t) ≈ 0.84168t2 − 2.55996t + 2.71828

(b) Full-Wave Cosine Fourier Series Expansion


We want to represent the interpolating polynomial P2 (t) ≈ At2 + Bt + C over t ∈ [0, 1]
using a Fourier cosine series (assuming even extension, period T = 1). The series form is
f (t) ≈ a0 + ∞
n=1 an cos(nω0 t), where ω0 = 2π/T = 2π.
P


f (t) ≈ a0 + an cos(2nπt)
X

n=1

Wait, the original prompt used cos(nπt), implying T = 2. Let’s assume the function is defined
on [0, 1] and we want its cosine series representation on this interval (implicitly extending it
evenly to [−1, 1]). Period T = 2, ω0 = 2π/2 = π.

f (t) ≈ a0 + an cos(nπt)
X

n=1

25
Fourier Coefficients Calculation
#1
1
"
t3 t2
Z 1 Z 1
A B
a0 = P2 (t) dt = (At + Bt + C) dt = A + B + Ct
2
= + +C
1 0 0 3 2 0
3 2
2 1
Z Z 1
an = P2 (t) cos(nπt) dt = 2 (At2 + Bt + C) cos(nπt) dt
1 0 0

We need the integrals tk cos(nπt) dt.


R

sin(nπt) 1
R1 h i
• 0 cos(nπt) dt = nπ = 0 for n ≥ 1.
0

cos(nπt) 1 (−1)n −1
h i
R1 t sin(nπt) cos(nπ) cos(0)
• 0 t cos(nπt) dt = nπ + (nπ)2 = (0 + (nπ)2
) − (0 + (nπ)2
) = (nπ)2
. This is 0
0
if n is even, and −2/(nπ)2 if n is odd.
2 sin(nπt) 1
h 2 i
t sin(nπt) 2t cos(nπt)
= (0 + 2(1)(nπ)
cos(nπ)
R1 2
• 0 t cos(nπt) dt = nπ + (nπ) 2 − (nπ) 3 2 − 0) − (0 + 0 − 0) =
0
2(−1)n
(nπ)2
.

So, for n ≥ 1:
 Z 1 Z 1 Z 1 
an = 2 A t cos(nπt) dt + B
2
t cos(nπt) dt + C cos(nπt) dt
0 0 0
2(−1)n (−1)n − 1
 
=2 A + B + C(0)
(nπ)2 (nπ)2
4A(−1)n + 2B((−1)n − 1)
=
(nπ)2

Numerical Coefficients

a0 = A3 + B2 + C ≈ 0.84168
3 + −2.55996
2 + 2.71828 ≈ 0.28056 − 1.27998 + 2.71828 ≈ 1.71886 For an :
If n is even (n = 2k), (−1)n = 1, (−1)n − 1 = 0.

4A(1) + 2B(0) 4A A 0.84168 0.0853


a2k = = 2 2 = 2 2 ≈ ≈
(2kπ) 2 4k π k π 2
k π 2 k2

If n is odd (n = 2k − 1), (−1)n = −1, (−1)n − 1 = −2.

4A(−1) + 2B(−2) −4A − 4B −4(A + B)


a2k−1 = = =
((2k − 1)π)2 (2k − 1) π
2 2 (2k − 1)2 π 2

A + B ≈ 0.84168 − 2.55996 = −1.71828.


−4(−1.71828) 6.87312 0.6962
a2k−1 ≈ = ≈
(2k − 1)2 π 2 (2k − 1)2 π 2 (2k − 1)2

Complete Fourier Series


∞ ∞
0.8417 6.8731
P2 (t) ≈ 1.7189 + cos(2kπt) + cos((2k − 1)πt)
X X

k=1
k2 π2 k=1
(2k − 1)2 π 2

26
The quadratic interpolating polynomial is:

P2 (t) ≈ 0.8417t2 − 2.5600t + 2.7183

Its Fourier cosine series representation on [0, 1] (period T = 2) is approximately:



P2 (t) ≈ 1.7189 + an cos(nπt)
X

n=1

 0.8417
(n/2)2 π 2
if n is even
where an = Or, written with index k:
 6.8731
2 2
n π
if n is odd

∞ ∞
0.8417 6.8731
P2 (t) ≈ 1.7189 + cos(2kπt) + cos((2k − 1)πt)
X X

k=1
k2 π2 k=1
(2k − 1)2 π 2

∞ ∞
cos(2kπt) cos((2k − 1)πt)
P2 (t) ≈ 1.7189 + 0.0853 + 0.6962
X X

k=1
k2 k=1
(2k − 1)2

27

You might also like