Use the Laplace transform to solve the given initial value p
Solution
Solution :
y\'\' - 2y\' + 2y = cos(t)
 =>
 { y\'\' - 2y\' + 2y } = { cos(t) }
 <=>
 { y\'\' } - 2{ y\' } + 2{ y } = { cos(t) }
 <=>
 s²{ y } - sy(0) - y\'(0) - 2(s{ y } - y(0)) + 2{ y } = s/(s² + 1)
 <=>
 s²{ y } - s - 2(s{ y } - 1) + 2{ y } = s/(s² + 1)
 <=>
 (s² - 2s + 2){ y } = (s/(s² + 1)) + (s - 2)
 <=>
 { y } = [s/(s² + 1)(s² - 2s + 2)] + [(s - 2)/(s² - 2s + 2)]
Decomposition to partial fractions for the first term on right hand side:
 s/(s² + 1)(s² - 2s + 2) = (As + B)/(s² + 1) + (Cs + D)/(s² - 2s + 2)
 <=>
 s = (As + B)(s² - 2s + 2) + (Cs + D)(s² + 1)
 <=>
 s = s³(A + C) + s²(-2A + B + D) + s(2A - 2B + C) + 1(2B + D)
 comparison of coefficients of same powers of s leads to
 A + C = 0
 -2A + B + D = 0
 2A - 2B + C = 1
 2B + D = 0
Solution to this equation system is:
 A = 1/5
 B = -2/5
 C = -1/5
 D = 4/5
 
 Hence,
 { y } = (1/5)[(s - 2)/(s² + 1)] - (1/5)[(s - 4)/(s² - 2s + 2)] + [(s - 2)/(s² - 2s + 2)]
 = (1/5)[(s - 2)/(s² + 1)] + (1/5)[(4s - 6)/(s² - 2s + 2)]
 =>
 y = ¹{ (1/5)  [(s - 2)/(s² + 1)] + (1/5)[(4s - 6)/(s² - 2s + 2)] }
 = (1/5)( ¹{ (s - 2)/(s² + 1) } + ¹{ (4s - 6)/(s² - 2s + 2) } )
 The first term can be easily expanded into the transforms of a sine and cosine function:
 ¹{ (s - 2)/(s² + 1) }
 = ¹{ s/(s² + 1) } - 2¹{ 1/(s² + 1) }
 = cos(t) - 2sin(t)
 
 The second term ra be reduced to the transform of sine and cosine by applying the shifting theorem
 ¹{ F(s - a) } = e^(at)¹{ F(s) }
 =>
 ¹{ (4s - 6)/(s² - 2s + 2) }
 = ¹{ (4s - 4 - 2)/(s² - 2s + 1 + 1) }
 = ¹{ (4(s - 1) + 2)/( (s - 1)² + 1) }
 = e^(t)  ¹{ (4s + 2)/( s² + 1) }
 = e^(t)  ( 4¹{ s/(s² + 1) } - 2¹{ 1/(s² + 1) }
 = e^(t) ( 4cos(t) - 2sin(t) )
 =>
 y(t) = (1/5)( cos(t) - 2sin(t) + e^(t)(4cos(t) - 2sin(t)) )
This is the required answer.


