\[y_c\]
of the homogeneous equation and any solution \[y_p\]
of the non homogeneous equation, then the general solution is \[y=y_c+y_p\]
. The solution that then be fitted to the initial or boundary conditions to find the values of the arbitrary constants.Example: Solve the equation
\[\ddot{y}+4y=3\]
with initial conditions \[y(\pi)=1, \: \dot{y}(\pi)=1\]
.The homogeneous equation is
\[\ddot{y}+4y=0\]
with solution \[y_c=Acos 2t+Bsin 2t\]
.The non homogeneous equation
\[\ddot{y}+4y=3\]
has a solution (found by putting \[y=C\]
) \[y=\frac{3}{4}\]
.The general solution is then
\[y=Acos 2t+Bsin2t + \frac{3}{4}\]
.\[y(\pi)=1 \rightarrow A+ \frac{3}{4} =1 \rightarrow A= 1-\frac{3}{4}= \frac{1}{4}\]
\[\dot{y}(\pi)=2 \rightarrow 2B =2 \rightarrow B= 1\]
Then
\[y=\frac{1}{4}cos2t+sin 2t+ \frac{3}{4}\]
.