# Second order non-homogeneous differential equation solution

Can someone find the solution of this differential equation:

$$y'' + 4x = \sec 2x ?$$

Any help would be highly appreciated.

• Are you sure this isn't supposed to be $y''+4y=\sec 2x$? – Tartaglia's Stutter Mar 1 at 20:13
• Yeah I am also supposing that it should be 4y instead of 4x but I have taken this question from some competitive previous examination so I am not sure about this. – Abdur Rehman Mar 1 at 20:15
• Do you know the two constant variation method. – hamam_Abdallah Mar 1 at 20:33
• If it is $x$ you just integrate twice in $x$. If it is $y$ you solve the homogeneous equation which gives $y_h(x)=A\cos 2x+B\sin 2x$. Then you find a particular solution using variation of parameters that is in the form $y_p(x)=A(x)\cos 2x+B(x)\sin 2x$. Your final solution is $y=y_h+y_p$. – GReyes Mar 1 at 20:33

$$y''=-4x+\sec(2x)$$ $$y'=-2x^2+\int \sec(2x)dx=-2x^2+\frac12\ln\Big(\tan(2x)+\sec(2x) \Big)+c_1$$ $$y=-\frac23 x^3+c_1x +\frac12\int \ln\Big(\tan(2x)+\sec(2x) \Big)dx +c_2$$ There is no closed form for the integral in terms of a finite number of elementary functions.

A closed form is complicated, involving special functions, namely the polylogarithm function. http://mathworld.wolfram.com/Polylogarithm.html

It is much simpler to consider the integral itself as the closed form, understood as a function defined by an integral. This is a kind of special function, but not presently in the list of standard special functions.

NOTE :

If this comes from a textbook exercise, obviously there is a typo in the equation $$\quad y''+4x=\sec(2x)$$.

The equation is certainly $$\quad y''+4y=\sec(2x)\quad$$. It is not difficult to solve it in terms of elementary functions.

Also solving $$\quad y''+4y'=\sec(2x)\quad$$ involves another special function.