# Need help solving a differential equation

Are there any known analytical method to solve the equation
$$A\frac{d^2f(x)}{dx^2}+B\frac{df(x)}{dx}+Ce^{igx}f(x) = 0\hspace{1cm}?$$
All quantities appearing in that equation are complex except for ##g## and ##x##.

The solution is $f_{(x)}=e^{a+bx}$. You need to find the complex constants a and b.

Thanks, but how do you come up with that solution? Have you ever found the above equation somewhere else and the solution is given like that?

Thanks, but how do you come up with that solution? Have you ever found the above equation somewhere else and the solution is given like that?
It is a trivial solution taught at any basic course of differential equations. If you have a differential equation written as $\sum_{n=0} ^m c_n \frac{\mathrm{d} ^n f_{(x)}}{\mathrm{d} x^n}=0$, then is is known that the solution is an exponential function.

It is a trivial solution taught at any basic course of differential equations. If you have a differential equation written as $\sum_{n=0} ^m c_n \frac{\mathrm{d} ^n f_{(x)}}{\mathrm{d} x^n}=0$, then is is known that the solution is an exponential function.
Please take a look again at the original equation, it is different from the one you suggest due to the presence of ##e^{igx}## in the third term.

There are many ways to solve it without previous knowledge of the solution. One is to make a Laplace or Fourier transform. It turns the problem into a very simple equation without any derivatives. You solve it, and reverse the transform.

Please take a look again at the original equation, it is different from the one you suggest due to the presence of ##e^{igx}## in the third term.
The exponential is easy to deal because exponents are added on multiplication.

One is to make a Laplace or Fourier transform.
I know what you mean there, but do those methods work for homogenous equation? For the moment just remove ##e^{igx}## from the third term, and then perform Fourier transform on each term. I will then get
$$Ak^2F(k) + iBkF(k) + CF(k) = 0$$
where ##F(k)## is the Fourier transform of ##f(x)##. How will you solve for a non-trivial solution of ##F(k)## in the above equation since the right hand side is zero? Even when ##e^{igx}## is retained, the equation in Fourier domain becomes
$$Ak^2F(k) + iBkF(k) + CF(k-g) = 0$$
I don't see how I can get an explicit expression for ##F(k)## in this case.

I know what you mean there, but do those methods work for homogenous equation? For the moment just remove ##e^{igx}## from the third term, and then perform Fourier transform on each term. I will then get
$$Ak^2F(k) + iBkF(k) + CF(k) = 0$$
where ##F(k)## is the Fourier transform of ##f(x)##. How will you solve for a non-trivial solution of ##F(k)## in the above equation since the right hand side is zero? Even when ##e^{igx}## is retained, the equation in Fourier domain becomes
$$Ak^2F(k) + iBkF(k) + CF(k-g) = 0$$
I don't see how I can get an explicit expression for ##F(k)## in this case.
Sorry, you are right. Is not trivial. I was wrong.

Is better to use Laplace transform, and even then you get a nasty work.

$$f(x) = \left ( c_1 \Gamma_{\left(\frac{B}{A g i}+1\right)} J_{\left({\frac{B}{A g i}} , \frac{2 \sqrt{A C e^{g i x}}}{A g i}\right)}+c_2 \Gamma_{\left(1-\frac{B}{A g i}\right)} J_{\left({-\frac{B}{A g i}} , \frac{2 \sqrt{A C e^{g i x}}}{A g i}\right)} \right) e^{-\frac{B x}{2 A}}$$

.. where $\Gamma$ is the Gamma function, $J_{(\alpha,x)}$ is the Bessel function; $c_1$ and $c_2$ are constants to adjust to your initial conditions.

Last edited:
• maNoFchangE
Thank you very much, I really appreciate your effort to help me. Just, can you please point out the steps you took to reach that solution?