"Undetermined coefficients" won't work here since tangent is not one of the functions you can have as a solution to a differential equation with constant coefficients.
But "variation of parameters" will always work. What did you get? One difficulty is that varation of parameters often leads to undoable integrals- but you can write the solution in terms of the integral.
Since this is a third order equation, you will have to require that all terms involving the first derivative of the unknown functions add to 0 after differentiating both times.
That is, assuming a solution of the form y(t)= u(t)+ v(t)cos(t)+ w(t)sin(t), y'= u'+ v'cos(t)- vsin(t)+ w' sin(t)+ wcos(t). Since, in fact, there are an infinite number of functions, u, v, w, that will work here, we "narrow the search" by requiring that u'+ v'cos(t)+ w'sin(t)= 0.
That leaves y'= -v sin(t)+ w cos(t). Differentiating that y"= -v' sin(t)- v cos(t)+ w' cos(t)- w sin(t). Again, we "narrow the search" by requiring that -v' sin(t)+ w' cos(t)= 0.
That leaves y"= -v cos(t)- w sin(t). Differentiating again, y"'= -v' cos(t)+ v sin(t)- w' sin(t)- w cos(t). Since we had y'= -v sin(t)+ w cos(t), y"'+ y'= -v' cos(t)- w' sin(t). The fact that cos(t) and sin(t) are solutions to the homogeneous differential equation caused all etcept the u' and v' terms to cancel.
Now we have three linear equations for u', v', and w':
u'+ v'cos(t)+ w'sin(t)= 0, -v' sin(t)+ w' cos(t)= 0, and -v' cos(t)- w' sin(t)= tan(t).
Solve those for u', v', and w' and integrate.
Since it has been over a month since this was posted, I will give the solution.
Multiply the equation -v'sin(t)+ w'cos(t)= 0 by sin(t) and the equation -v' cos(t)- w' sin(t)= tan(t) by cos(t) to get
[tex]-v' sin^2(t)+ w'sin(t)cos(t)= 0[/tex]
and
[tex]-v' cos^2(t)- w'sin(t)cos(t)= sin(t)[/tex]
Adding those equations eliminates w' and leaves [itex]-v'= sin(t)[/itex]. Integrating, v(t)= cos(t)+ C. We can take the constant to be 0.
Putting v'= -sin(t) into -v' sin(t)+ w' cos(t)= 0, [itex]sin^2(t)+ w' cos(t)= 0[/itex] so that
[tex]w'= \frac{sin^2(t)}{cos(t)}[/tex]. To integrate that, multiply numerator and denominator by cos(t) to get
[tex]w'= \frac{sin^2(t)}{cos^(t)} cos(t)= \frac{sin^2(t)}{1- sin^2(t)} cos(t)[/itex] <br />
<br />
Letting u= sin(t), we have<br />
[tex]w(t)= \int \frac{sin^2(t)}{1- sin^2(t)} cos(t) dt= \int \frac{u^2}{1- u^2} du= \int -1- u^-2 du[/tex]<br />
[tex]= -u+ u^{-1}+ C= -sin(t)+ \frac{1}{sin(t)}+ C[/tex]<br />
<br />
Putting v'= - sin(t) and [itex]w'= sin^2(t)/cos(t)[/itex] into u'+ v'cos(t)+ w'sin(t)= 0, u'- sin(t)cos(t)+ sin^3(t)/cos(t)= 0, [itex]+ u'= sin(t)cos(t)- sin^3(t)/cos(t)= sin(t)(cos^2(t)- sin^2(t))/cos(t)[/itex]. Integrate that to find u.[/tex]