Particular Integral
HallsofIvy said:
You are talking about using the "method of undermined coefficients"? That only works when the right hand side is on of the types of functions that you can get as solutions of linear constant coefficients equations: exponentials, sine or cosine, polynomials, or products of those. tan(x) is not of that type so "undetermined coefficients" will not work. Try "variation of parameters".
Actually its called "Method of Undetermined Coefficients" for finding solutions in terms of Particular Integral and Complementary Function for Non-homogeneous Linear Equations with constant coefficients for Second Order Differential Equations.
There are rules for the same in case we find the "forcing functions"(the terms on the right hand side) such as these.
Rules are based on forcing functions
RULE 1
If form of forcing function is in the form of A.exp(kx)
then form of PI will be
C.exp(kx), when k is not a root.
If k is a single root, then C.x.exp(kx)
If k is a double root, then C.x(square).exp(kx)
=====================================================================
RULE 2
If form of forcing function is in the form of Ploynomial then
if k=0 is not a root, PI will be C0+C1.x(raise to 1)+C2.x(square)+...
if k=0 is a single root, PI will be x(C0+C1.x+...)
if k=0 is a double root, PI will be x(square)(C0+C1.x+...)
=====================================================================
RULE 3
If form of focring function is A coskx and
if roots are of nature such as ik and its not a root, then PI will be C coskx + D sinkx
If form of corcing function is A sinkx and
if roots are of nature such as ik and its a single root, then PI will be x(C cos kx + D sinkx)
I hope that gives you a light, instead of the solution directly. :-)