Solving an Initial Value Second Order Non Homogeneous Linear Differential Equation With Constant Coefficients

Any constant coefficient non homogeneous linear differential equation with initial or boundary conditions can be solved by finding the complementary solution  
  of the homogeneous equation and any solution  
  of the non homogeneous equation, then the general solution is  
. The solution that then be fitted to the initial or boundary conditions to find the values of the arbitrary constants.
Example: Solve the equation  
  with initial conditions  
\[y(\pi)=1, \: \dot{y}(\pi)=1\]
The homogeneous equation is  
  with solution  
\[y_c=Acos 2t+Bsin 2t\]
The non homogeneous equation  
  has a solution (found by putting  
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\]

\[y=\frac{1}{4}cos2t+sin 2t+ \frac{3}{4}\]