I do want to solve the following differential equation analytically: $$\frac{dx(t)}{dt} + \sin(x(t)) = \sin(\omega t)$$ I tried several methods to solve this equation, unfortunately without any success. In the last week, I have read a lot of papers related to that kind of prototype and have looked into all the books that deal with first order differential equations. It still seems to be impossible. Neither Wolfram-alpha, nor Matlab's symbolic toolbox can give me a solution for it. Because of that, I am wondering if there is actually a solution for that kind of differential equation?

Thanks for your help!

  • 3
    $\begingroup$ No CAS being able to solve is a very good sign that you can't neither. Due to the non-linearity (sine), I doubt that there is a closed-form expression. For small angles, use $\sin x\approx x$. $\endgroup$
    – user65203
    Commented Nov 20, 2018 at 17:21
  • $\begingroup$ What about assumptions? Could that help you to find a solution? Actually I can not believe that such an equation is not solvable. $\endgroup$
    – RCal
    Commented Nov 20, 2018 at 17:24
  • 3
    $\begingroup$ It's very likely that there are no closed-form solutions to this differential equation. Most differential equations are like that. Of course there are solutions. You can solve the differential equation numerically, or find arbitrarily many terms of a series. $\endgroup$ Commented Nov 20, 2018 at 17:24
  • $\begingroup$ Thanks. However, I cannot use the small-angle approximation, because I do need that term in order to describe a certain physical phenomena. Any more guesses? $\endgroup$
    – RCal
    Commented Nov 20, 2018 at 17:26
  • 1
    $\begingroup$ E.g. in Maple: dsolve({D(y)(t) + sin(y(t)) = sin(w*t), y(0)=y0}, y(t), series, order=20); $\endgroup$ Commented Nov 20, 2018 at 17:48

2 Answers 2


Of course solutions do exist, we might just be unable to find closed form representations for them. This doesn't mean we can't compute them numerically: here are some IVP trajectories with $\omega=1$ enter image description here

You can plot just a fundamental patch $t\in[0,2\pi]$, $x\in[-\pi,\pi]$ thanks to the periodicity (I've highlighted in red the stable periodic solution and in blue the unstable periodic solution): enter image description here

Alternative visualization: enter image description here

Edit. Code for the plots, in Mathematica:

sol = ParametricNDSolve[{
    x'[t] + Sin[x[t]] == Sin[t],
    x[0] == x0},
   x, {t, 0, 4 \[Pi]}, {{x0, -3 \[Pi], 3 \[Pi]}}];
   x[x0][t] /. sol, {x0, -3 \[Pi], 2.5 \[Pi], .25}], {t, 0, 3.5 \[Pi]}]

per = NDSolve[{
    x'[t] + Sin[x[t]] == Sin[t],
    x[0] == x[2 \[Pi]]},
   x, {t, 0, 2 \[Pi]}];
Show[StreamPlot[{1, Sin[t] - Sin[x]}, {t, 0, 2 \[Pi]}, {x, -\[Pi], \[Pi]}],
 Plot[Evaluate[x[t] /. per], {t, 0, 2 \[Pi]}, PlotStyle -> Red]]
  • $\begingroup$ Thanks! What exactly does the fundamental patch tell me? It does not seem to be just another representation of the solution x(t) with respect to t. $\endgroup$
    – RCal
    Commented Nov 20, 2018 at 18:01
  • 1
    $\begingroup$ Well, you know that the entire plane is filled with this repeating pattern, so this picture gives a pretty complete idea of the behavior of the solutions. $\endgroup$
    – Federico
    Commented Nov 20, 2018 at 18:03
  • $\begingroup$ I've now added a plot of the periodic solution overlaid on top of the stream plot. From the first picture you can see that this periodic solutions are attractive. You might be interested in studying this phenomenon, related to the stability of the system $\endgroup$
    – Federico
    Commented Nov 20, 2018 at 18:05
  • 1
    $\begingroup$ A bit harder to see in that plot, but there's also another (unstable) periodic solution with $y(0) \approx 2.604965594$. $\endgroup$ Commented Nov 20, 2018 at 19:48
  • $\begingroup$ @RobertIsrael Updated to the plot, thanks $\endgroup$
    – Federico
    Commented Nov 21, 2018 at 15:24

Surprisingly, this differential equation can be "solved analytically", albeit in terms of non elementary functions.

First we have the equation

$$\frac{dx(t)}{dt} + \sin(x(t)) = \sin(\omega t)$$

which i will rewrite as

$$\frac{dx}{dt} + \sin(x) = \sin(\omega t)$$

(to make it easier type)

now substitute $$x= -\frac{\cos(\omega t)}{\omega} + u$$

therefore $$\frac{dx}{dt}= \sin(\omega t) + \frac{du}{dt}$$

after rearranging the equation becomes $$\frac{du}{dt} + \sin\left(-\frac{\cos(\omega t)}{\omega} + u\right) =0$$

which can be rewritten as $$\frac{du}{dt} = \sin\left(\frac{\cos(\omega t)}{\omega} - u\right)$$

now using the identity $\sin(\theta) = \frac {e^{i\theta}-e^{-i\theta}}{2i}$

our equation can be rewritten as $$\frac{du}{dt} = \frac{e^{i\left(\frac{\cos(\omega t)}{\omega} - u\right)}-e^{i\left(\frac{-\cos(\omega t)}{\omega} + u\right)}}{2i}$$

now we rearrange the terms to arrive at $$2i\frac{du}{dt} = \frac{e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}}{e^{iu}}- \frac {e^{iu}} {e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}}$$

now substitute $e^{iu} = v$

therefore $$ \frac{dv}{dt}=iv \frac{du}{dt}$$

Also $$ \frac{2}{v} \frac{dv}{dt} = \frac{e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}}{v}- \frac {v} {e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}}$$

Now we can use variable separation method by grouping the terms having $v$

in the denominator and then rearrange the equation as

$$ \frac{1}{v^2} \frac{dv}{dt} = \frac{1}{{e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}}{\left(e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}-2\right)}}$$

for now we shall focus on the RHS (right hand side) $$ RHS = \frac{-1}{2{e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}}} + \frac{1}{2{\left(e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}-2\right)}} $$

(By method of partial fractions)

Now to solve this ode we must integrate this equation with respect to t

NOTE: These integrals are non elementary

To avoid clutter i will integrate each term of the RHS separately let $$I_1 =\frac{-1}{2} \int e^{-i\left(\frac{\cos(\omega t)}{\omega}\right)}dt$$

Substitute $p=-i\left(\frac{\cos(\omega t)}{\omega}\right)$

Also $dp=i \sin(\omega t)dt=i(1+(w^2p^2))^{\frac{1}{2}}dt $

Thus $$I_1 =\frac{-1}{2} \int \frac{e^{p}}{i(1+(w^2p^2))^{\frac{1}{2}}}dp$$

Taylor series expansion of$$ \frac{1}{(1+(w^2p^2))^{\frac{1}{2}}}= \sum_{n=0}^{\infty} \frac{(2n-1)!!\,(-1)^n (w)^{2n} p^{2n}}{(2^n) (n!)}$$

Now substitute this in the integral, separate the constants and interchange the

integral and summation $$I_1 =\frac{i}{2} \sum_{n=0}^{\infty} \frac{(2n-1)!!\,(-1)^n (w)^{2n} \int{e^p p^{2n}}}{(2^n) (n!)}dp$$

Finally $$I_1 =\frac{i}{2} \sum_{n=0}^{\infty} \frac{(2n-1)!!\,(-1)^n (w)^{2n}\: \Gamma(2n+1,-p)}{(2^n) (n!)}$$

Where $\Gamma$ is the incomplete gamma function and $p=-i\left(\frac{\cos(\omega t)}{\omega}\right)$

Now let $$I_2 =\frac{1}{2} \int \frac{1}{\left(e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}-2\right)}dt$$

Substitute $z=e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}$ in the expansion of $\frac{1}{z-2}$

To obtain $$\frac{1}{e^{i\left(\frac{\cos(\omega t)}{\omega}\right)}-2}=\sum_{n=0}^{\infty} (-1)\left(\frac{1}{2}\right)^{1+n}\:e^{ni\left(\frac{\cos(\omega t)}{\omega}\right)}$$

Now substitute the summation in the integral and separate its first term $$I_2 =\frac{-1}{4} \int {\left(1 + \sum_{n=1}^{\infty} \left(\frac{1}{2}\right)^{n}\:e^{ni\left(\frac{\cos(\omega t)}{\omega}\right)}\right)}dt$$

Interchange the summation and integral sign and simplify to obtain $$I_2 =\frac{-1}{4} t + \sum_{n=1}^{\infty} \left(\frac{1}{2}\right)^{n}\:\int e^{ni\left(\frac{\cos(\omega t)}{\omega}\right)}dt$$

Now let $I_3=\int e^{ni\left(\frac{\cos(\omega t)}{\omega}\right)}dt$

Similar to how $I_1$ was 'solved', $I_3$ can be 'solved' by substituting $$Q_n=ni\left(\frac{\cos(\omega t)}{\omega}\right)$$

So $I_2$ will evaluate to a double summation

The LHS will evaluate to a function of x

(The final solution is too long to type in neatly)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .