yp=uy1+vy2yp′=u′y1+uy1′+v′y2+vy2′Set u′y1+v′y2=0(1) to simplify further equations. That implies
yp′=uy1′+vy2′.
yp′′=uy1′′+u′y1′+vy2′′+v′y2Substituting yp′′,yp′,yp to the differential equation:
yp′′+Pyp′+Qyp=u′y1′+v′y2′This implies u′y1′+v′y2′=f(x)(2).
From equations (1) and (2), where W(x) is the wronskian of y1,y2:
u′=−W(x)y2f∧v′=W(x)y1fu=−∫W(x)y2fdx∧v=∫W(x)y1fdxyp can be found now using u,v,y1,y2