7

Find a solution for the following second order ODE

$$x''(t)+(x'(t))^2+\sin(x(t))=0, \; x(0)=\pi,\;x'(0)=0.$$

I am familiar with the characteristics equations method or assuming $y=e^{rx}$, however both approaches seem unavailable for this equation.

I tried simplifying the equation by assuming that we only seek a solution around the point $x(0)=\pi$ and therefore $\sin(x)\approx-x$, which reduces the problem to $$x''+(x')^2-x=0.$$

From here I still don't see how to work around $(x')^2$

Sean Roberson
  • 10,119
Weyr124
  • 135
  • Where did you find this problem? –  May 19 '24 at 17:58
  • 6
    Hint: it's a trick question, made to look much harder than it is. Evaluate $x''(0)$ and then think about it. – Ian May 19 '24 at 18:01
  • Its an exam problem from course about deeper ODE theory – Weyr124 May 19 '24 at 18:04
  • Don't try to find the general solution. Follow @Ian's hint. – Gonçalo May 19 '24 at 18:05
  • 1
    ...is it from your exam, or a past exam? – Ian May 19 '24 at 18:10
  • I see that $x'(0)=x''(0)=0$, so we have an inlection point and stationary point in 0, but I don't see how that implies that the solution is constant for all arguments. The problem is from my past exam which I couldn't solve – Weyr124 May 19 '24 at 18:22
  • "... but I don't see how that implies that the solution is constant for all arguments." It doesn't. I think Ian was trying to point you towards a guess, rather than give you a logical argument ending in a constant solution. – Theo Bendit May 19 '24 at 18:27
  • @Ian I couldn't get my head around the conditions $x(0)=0$ and $x'(0)=0$: certainly any perturbative expansion around $\pi$ gives the solution $x=\pi$ to all orders. But your comment made me realise that the boundary conditions and full differential equation itself also imply that $x^{(n)}(0)=0$ for all natural numbers $n$. – Bunneh May 19 '24 at 18:42
  • 2
    @Weyr124 It doesn't imply that there is no other solution; you would need to invoke a uniqueness theorem of some kind for that. But you weren't asked for that. You were just asked to find one. – Ian May 19 '24 at 19:03
  • Remark: This is not the pendulum equation with friction term, because the physically correct model for that has $|x'(t)|,x'(t)$ as the second term. – Lutz Lehmann May 20 '24 at 10:41
  • "I am familiar with ..." Those are methods for linear DEs, but this one is not linear. – GEdgar May 30 '24 at 14:57

4 Answers4

9

The problem asks for a solution. Find one easiest, simplest solution.

If $x''(t)=0$ and $x'(t)=0$ then the equation becomes:

$$\sin(x(t))=0, \; x(0)=\pi$$

One solution is $x(t) = \pi$. My apologies for not being very mathy, but trivial solutions aren't wrong.

  • The boundary conditions $x(0)=\pi$ and $x'(0)=0$ imply that $x^{(n)}(0)=0$ to all orders giving credence to this solution. Also numerically solving the full ODE in Mathematica suggests that the trivial solution is in this case the full solution. – Bunneh May 19 '24 at 18:44
  • 1
    I don't follow the logic behind your first sentence about boundary conditions in isolation from the differential equation. For example, $$x(t) = e^{-t}+t+\pi-1$$ has $x(0) = \pi$ and $x'(0) = 0$, but $x''(0)=1$. – Marc Shelikoff May 19 '24 at 19:08
  • 1
    The differential equation informs $x’’(t)=-sin(x(t))-x’’(t)$. Evaluation at $t=0$ and using the boundary conditions implies $x’’(0)=0$. Further differentiation of the differential equation gives the rest – Bunneh May 20 '24 at 05:33
  • I believe I see it now. The differential equation informs $x''(t) = -sin(x(t))-(x'(t))^2$. Using the boundary conditions implies $x''(0)=0$. Further differentiation yields $x^{(3)}(t) = -cos(x(t))x'(t)-2(x'(t))x''(t)$ which yields $x^{(3)}(0)=0$, and further differentiation always yields a sum of terms which have previously been shown to be zero, so $x^{(n)}(0)=0$. – Marc Shelikoff May 20 '24 at 13:17
2

Let us try parametrization: $p(x)\equiv x'(t)\implies x''(t)=pp'(x)$. The ODE then becomes $$pp'(x)+p^2+\sin(x)=0\overset{u(x)\equiv p^2}{\iff}\dfrac{1}{2}u'(x)+u+\sin(x)=0$$ Solving the homogeneous ODE we obtain $$u_h(x)=Ae^{-2x}$$ By employing the method of variation of parameters $(u_p=A(x)e^{-x})$ we arrive at the full solution $$u(x)=Ae^{-2x}-\dfrac{4\sin(x)}{5}+\dfrac{2\cos(x)}{5}$$ Reverting the substitution, we get this other ODE: $$x'(t)^2=Ae^{-2x}-\dfrac{4\sin(x)}{5}+\dfrac{2\cos(x)}{5}.$$ Previous to separating variables, let's rather apply the derivative's initial condition $(x'(0)=0)$ in order to find $A$: $$0=A+\dfrac{2}{5}\implies A=-\dfrac{2}{5}$$ Therefore, $$\int_0^t\mathrm dt=\boxed{t=\int_\pi^x\dfrac{\pm\,\mathrm dx'}{\sqrt{-\dfrac{2}{5}e^{-2x'}-\dfrac{4\sin(x')}{5}+\dfrac{2\cos(x')}{5}}}},$$ where we already incorporated the remaining inital condition in the limits of integration.

Hug de Roda
  • 4,060
  • 1
    I don't think think this can be correct. Note that the equation can be rewritten as $x'=p,p'=-p^2+\sin(x)$; that's a locally Lipschitz vector-valued function of $(p,x)$; so the solution to an IVP is unique. – Ian May 19 '24 at 20:59
  • I made an error, it should be $p'=-p^2-\sin(x)$, but that doesn't change the point. – Ian May 19 '24 at 21:07
  • 2
    Note that the square root in the denominator of your formal solution is strictly negative for $x \in (0, \pi]$, so this is not actually a valid solution to the ODE. (The error being, of course, that the last step implicitly assumes that $x(t)$ is an invertible function; so what this shows is that there is no solution for which $x(t)$ is invertible near $x = \pi$.) – Michael Seifert May 20 '24 at 13:01
1

Your initial value problem is of the form $$X'=F(X),\quad X(0)=\begin{pmatrix}\pi\\0\end{pmatrix}$$ where $F:\Bbb R^2\to\Bbb R^2$ is $C^1$ hence locally Lipschitz: $$F\begin{pmatrix}u\\v\end{pmatrix}=\begin{pmatrix}v\\-v^2-\sin u\end{pmatrix}.$$ Therefore, by Picard–Lindelöf theorem, the maximal solution is unique.

Since $X(t)=\begin{pmatrix}\pi\\0\end{pmatrix}$ is (obviously) a solution, it is the solution.

Anne Bauval
  • 49,005
0

Forgetting the conditions, if you switch variables, the equation becomes $$-\frac {t''}{[t']^3}+\frac {1}{[t']^2}+\sin(x)=0$$

Reduction of order $$t'=\pm \frac{\sqrt{5}\, e^x}{\sqrt{2 e^{2 x} \cos (x)-4 e^{2 x} \sin (x)+ c_1}} $$ $$t+c_2=\pm \int \frac{\sqrt{5}\, e^x}{\sqrt{2 e^{2 x} \cos (x)-4 e^{2 x} \sin (x)+ c_1}} $$