# Particular Solution of an Inhomogeneous Second Order ODE

## Homework Statement

A particular solution of y'' + 4y = tanx

(a) 1/2*cos(2x)ln|sec(2x)+tan(2x)|
(b) -1/2*cos(2x)ln|sec(2x)+tan(2x)|
(c) 1/2*sin(2x)(ln*cos(x)+x*sec(2x))
(d) 1/2*sin(2x)(ln*cos(x)-x*sec(2x))
(e) none of the above

## The Attempt at a Solution

I used variation of parameters with y1=cos(x) and y2=sin(x)

Wronskian(cos(x) sin(x))=1

yp=-v1y1+v2y2

v1'=sin(x)tan(x)
=(sin(x))^2/cos(x)
=(1-(cos(x))^2)/cos(x)
=1/cos(x)-cos(x)

v1=ln|tan(x)+sec(x)|-sin(x)

v2'=cos(x)tan(x)
=sin(x)

v2=-cos(x)

yp=-cos(x)(ln|tan(x)+sec(x)|-sin(x))+sin(x)(-cos(x))
=-cos(x)ln|tan(x)+sec(x)|+cos(x)sin(x)-sin(x)cos(x)
=-cos(x)ln|tan(x)+sec(x)|

Given the answer choices, now I feel like I've missed something fundamental. It's probably obvious. So sorry.

Related Calculus and Beyond Homework Help News on Phys.org
The solutions to the homogeneous part are not correct. Think cos(2x) and sin(2x).

Why not use the normal method?
Rewriting in terms of the D operator,
(D² + 4)y = tan(x).

The auxiliary equation of this D.E. is D = ±2i, henceforth we obtain the complementary function to be -:

CF = e0[c1cos2x + c2sin2x]

For a function such as tan(x), the particular integral is given by -:

Operating separately, we have -:

and

Once you compute these integrals, the complete solution of the differential equation will be given by -:

CS = CF + PI

The solutions to the homogeneous part are not correct. Think cos(2x) and sin(2x).
Why not use the normal method?
Rewriting in terms of the D operator,
(D² + 4)y = tan(x).

The auxiliary equation of this D.E. is D = ±2i, henceforth we obtain the complementary function to be -:

CF = e0[c1cos2x + c2sin2x]

For a function such as tan(x), the particular integral is given by -:

Operating separately, we have -:

and

Once you compute these integrals, the complete solution of the differential equation will be given by -:

CS = CF + PI

Thanks a lot. I understand now. I was not sure about the fundamental set when dealing with tan(x), but I see it now.

SVXX: Because the lesson was on variation of parameters.