# Method of constant coefficient

I saw this question: $$y''+y=\cot x$$

As supposed I solved the homogenous part by forming the characteristic equations: $$r^2 + 1 =0$$. and obtained the solution for the homogenous part as : $$y = C_1\cos x + C_2\sin x.$$ But I am a bit confused as to solve the non homogenous part using the method of constant coefficient. Can anyone assist ?

• Yes I have learned variation of parameters, but just wanted to know if the equation can be solved by constant coefficient – Astatine Nov 12 '18 at 14:05
• Ok. Supposing I am to use method of constant coefficients in the computation of the non homogenous, what will be the guess of cotx, will it be sinx + cos x? – Astatine Nov 12 '18 at 14:09
• No, the method of undetermined coefficients does not work here, as it only works if all terms on the right are of the polynomial times exponential type. The trig functions sine and cosine are sums and differences of complex exponentials, so they count. The (co-)tangent can not be written that way. – LutzL Nov 12 '18 at 16:38
• I think this is not what the method is called. Do you mean undetermined coefficients as LutzL says? – Yuriy S Nov 12 '18 at 16:53
• @LutzL, technically the method still works, doesn't it? The integral could be non-elementary, but that's a whole other business. In this case, it is a rational combination of trig functions, so also elementary – Yuriy S Nov 12 '18 at 16:55