The general solution can be written as y = y h + y p . y=y_h+y_p. y = y h + y p .
Homogeneous differential equation
y ′ ′ + 2 y = 0 y''+2y=0 y ′′ + 2 y = 0 The characteristic polynomial
r 2 + 2 = 0 r^2+2=0 r 2 + 2 = 0
r 1 = − i 2 , r 2 = i 2 r_1=-i\sqrt{2}, r_2=i\sqrt{2} r 1 = − i 2 , r 2 = i 2
y h = c 1 cos ( 2 x ) + c 2 sin ( 2 x ) y_h=c_1\cos (\sqrt{2}x)+c_2\sin (\sqrt{2}x) y h = c 1 cos ( 2 x ) + c 2 sin ( 2 x ) Let y p = A x + B . y_p=Ax+B. y p = A x + B . Then y p ′ ′ = 0 y_p''=0 y p ′′ = 0
2 ( A x + B ) = − x 2(Ax+B)=-x 2 ( A x + B ) = − x
A = − 1 2 , B = 0 A=-\dfrac{1}{2}, B=0 A = − 2 1 , B = 0
y p = − 1 2 x y_p=-\dfrac{1}{2}x y p = − 2 1 x
y = c 1 cos ( 2 x ) + c 2 sin ( 2 x ) − 1 2 x y=c_1\cos (\sqrt{2}x)+c_2\sin (\sqrt{2}x)-\dfrac{1}{2}x y = c 1 cos ( 2 x ) + c 2 sin ( 2 x ) − 2 1 x
y ( 0 ) = 0 : c 1 cos ( 2 ( 0 ) ) + c 2 sin ( 2 ( 0 ) ) − 1 2 ( 0 ) = 0 y(0)=0:c_1\cos (\sqrt{2}(0))+c_2\sin (\sqrt{2}(0))-\dfrac{1}{2}(0)=0 y ( 0 ) = 0 : c 1 cos ( 2 ( 0 )) + c 2 sin ( 2 ( 0 )) − 2 1 ( 0 ) = 0
c 1 = 0 , y = c 2 sin ( 2 x ) − 1 2 x c_1=0, y=c_2\sin (\sqrt{2}x)-\dfrac{1}{2}x c 1 = 0 , y = c 2 sin ( 2 x ) − 2 1 x
y ′ = c 2 cos ( 2 x ) − 1 2 y'=c_2\cos (\sqrt{2}x)-\dfrac{1}{2} y ′ = c 2 cos ( 2 x ) − 2 1
y ( 1 ) + y ′ ( 1 ) = 0 y(1)+y'(1)=0 y ( 1 ) + y ′ ( 1 ) = 0
c 2 sin ( 2 ( 1 ) ) − 1 2 ( 1 ) + c 2 cos ( 2 ( 1 ) ) − 1 2 = 0 c_2\sin (\sqrt{2}(1))-\dfrac{1}{2}(1)+c_2\cos (\sqrt{2}(1))-\dfrac{1}{2}=0 c 2 sin ( 2 ( 1 )) − 2 1 ( 1 ) + c 2 cos ( 2 ( 1 )) − 2 1 = 0
c 2 = 1 sin ( 2 ) + cos ( 2 ) c_2=\dfrac{1}{\sin(\sqrt{2})+\cos(\sqrt{2})} c 2 = sin ( 2 ) + cos ( 2 ) 1 Then
y = 1 sin ( 2 ) + cos ( 2 ) sin ( 2 x ) − 1 2 x y=\dfrac{1}{\sin(\sqrt{2})+\cos(\sqrt{2})}\sin (\sqrt{2}x)-\dfrac{1}{2}x y = sin ( 2 ) + cos ( 2 ) 1 sin ( 2 x ) − 2 1 x
Comments