Solve $\begin{align*}\frac{dx}{dt}=\frac{at-\cos{x}}{at^2\tan{x}+t}\end{align*}\\\\ $

Am I justified in doing the following substitution? If not, can a closed-form solution be found?

Let $t=r\cos{x}$ and $dt=-r\sin{x}dx$

$\begin{align} \frac{dx}{dt}&=\frac{(ar-1)\cos{x}}{ar^2\cos^2{x}\tan{x}+r\cos{x}}\\\\ \frac{dx}{dt}&=\frac{(ar-1)\cos{x}}{(ar\sin{x}+1)r\cos{x}}\\\\ dx&=-\frac{(ar-1)}{(ar\sin{x}+1)r}r\sin{x}dx\\\\ 1&=-\frac{(ar-1)\sin{x}}{(ar\sin{x}+1)}\\\\ ar\sin{x}+1&=-(ar-1)\sin{x}\\\\ 1&=(1-2ar)\sin{x}\end{align}$


$\begin{align} 1&=-(1-2ar)\frac{dt}{rdx}\\\\ \int{rdx}&=\int(2ar-1){dt}\\\\ x&=(2a-\frac{1}{r})t+c \end{align}$


Here is some background on the above differential equation.

The following equations describe the requirements of a curve $f$ which elastically reflects particles in a desired fashion, the details of which I will not cover.

$\begin{equation}f(x,t)=t \tan{x}+\frac{a}{2}t^2 \sec^2{x}+h, \ \ \ \ \ 0<x<\pi \\\\ \frac{\partial f(x,t)}{\partial t}=\tan{\left(\frac{x}{2}-\frac{\pi}{4}\right)} \end{equation}$

where $x$ is t-dependent. We can differentiate the first equation above with respect to t, taking care to evaluate the derivative of $x$, as well. \begin{align*}\frac{\partial f\left(x, t\right)}{\partial t}&=\tan{x}+t\sec^2{x}\frac{dx}{dt}+at\sec^2{x}+at^2\tan{x}\sec^2{x}\frac{dx}{dt}\\\\ \tan{\left(\frac{x}{2}-\frac{\pi}{4}\right)}&=\tan{x}+\left[\left(t+a t^2\tan{x}\right)\frac{d x}{dt}+at\right]\sec^2{x}\\\\ \tan{x}-\sec{x}&=\tan{x}+\left[\left(t+a t^2\tan{x}\right)\frac{d x}{dt}+at\right]\sec^2{x}\\\\ \frac{dx}{dt}&=\frac{at-\cos{x}}{at^2\tan{x}+t}\\\\ \end{align*}

  • 1
    $\begingroup$ Good question. If you assume that $r$ is constant (and it seems that you're doing that), it doesn't make sense. Let's say for example we're looking at the initial value problem with $x(0) = 0$. Then for some interval $[0,t_0]$ we have $x(t) \in [-1,1]$. But then $$ t = r\cos(x) \quad \Leftrightarrow \quad x(t) = \arccos(t/r)$$ $\endgroup$ – user159517 May 16 '16 at 9:43
  • $\begingroup$ are you sure that there is no typo? $\endgroup$ – Dr. Sonnhard Graubner May 16 '16 at 9:44
  • 1
    $\begingroup$ If $r$ is constant, then you are assuming that the solution is $x=\cos^{-1}kt$ for some constant $k$. If you are not assuming $r$ is constant, then it depends on $t$, so you cannot treat it as a constant when finding $dt$. So the short answer is: no, you are not justified. $\endgroup$ – almagest May 16 '16 at 9:47
  • 1
    $\begingroup$ Differentiating $x(t) = \arccos(t/r)$ shows that the ODE is not satisfied, i.e. the substitution doesn't make sense for constant $r$. $\endgroup$ – user159517 May 16 '16 at 9:49
  • 1
    $\begingroup$ @ Master Drifter : They are several mistakes in your calculus. First of all if you set $t=r \cos x$ with $r=$constant you suppose to a-priori the solution is known. This is not true because $x=\cos^{-1}\left(\frac{t}{r} \right)$ is not solution of the ODE. Second : you write $ar\sin x +1=-(ar-1)\sin x \quad\to\quad 1=\sin x$ This is false because: $1=-(2ar-1)\sin x$ which anyways is of no use to solve the ODE, due to the first mistake. $\endgroup$ – JJacquelin May 16 '16 at 10:00

$$\frac{dx}{dt}=\frac{at-\cos{x}}{at^2\tan{x}+t}$$ As you know, the ODEs not issued from scholar exercises are rarely solvable in terms of standard functions.

The solutions of some ODEs frequently encontered are now expressed on closed form because special functions were especially defined and standardized just for this use.

It seems that the solutions of your ODE cannot be expressed on closed form with the standard special functions presently available.

If you need to present your numerical results on a more theoretical aspect, on the form of a mathematic formula, I don't see other way than to create a new special function. Of course this special function will be a non-standard special function.

Citation from https://fr.scribd.com/doc/34977341/Sophomore-s-Dream-Function , p.3 : << A special function has to acquire a background of property, descriptions, formulas and derivations as extended as possible. So, it will be preferable to simply refer to a particular part of the background, instead of searching and redoing a development by ourselves. Before becoming a referenced special function, its name has to be spread in the literature in order to become familiar. More importantly, the function should be useful in a branch of mathematics or physics. >>

To make the study and description more concise and recognizable, chose a name (for example "MDF" : the Master Drifter's Function) and change of symbol : $$\begin{cases} X=at \\ MDF(X)=x \end{cases} \quad\to\quad \frac{d}{dX}MDF=\frac{X-\cos(MDF)}{X^2\tan(MDF)+X} $$ Gives a description of the new function $MDF(X)$ : properties, behaviour, table of numerical values, etc. coming from numerical solving of the ODE just above.

The closed form of the solution of the initial ODE will be : $$x(t)=MDF(at)$$

In fact, this is valid only for a given initial condition (or boundary condition). To give more extent to the new function $MDF(p\:;\:X)$, a parameter should to be introduced and numerical calculus done for various initial conditions, together with the relationship beteween $p$ and the initial condition. So that, the general solution of the initial ODE would be : $$x(t)=MDF(p\:;\: at)$$ with any constant $p$ if the initial condition is not defined, or with a specific value of $p$ according to the initial condition if known.


Assume $a\neq0$ for the key case:

$\dfrac{dx}{dt}=\dfrac{at-\cos x}{at^2\tan x+t}$

$(at-\cos x)\dfrac{dt}{dx}=at^2\tan x+t$

This belongs to an Abel equation of the second kind.

Let $u=at-\cos x$ ,

Then $t=\dfrac{u+\cos x}{a}$

$\dfrac{dt}{dx}=\dfrac{1}{a}\dfrac{du}{dx}-\dfrac{\sin x}{a}$

$\therefore u\left(\dfrac{1}{a}\dfrac{du}{dx}-\dfrac{\sin x}{a}\right)=a\dfrac{(u+\cos x)^2}{a^2}\tan x+\dfrac{u+\cos x}{a}$

$\dfrac{u}{a}\dfrac{du}{dx}-\dfrac{u\sin x}{a}=\dfrac{u^2\tan x+(2\sin x+1)u+(\sin x+1)\cos x}{a}$

$\dfrac{u}{a}\dfrac{du}{dx}=\dfrac{u^2\tan x+(3\sin x+1)u+(\sin x+1)\cos x}{a}$

$u\dfrac{du}{dx}=u^2\tan x+(3\sin x+1)u+(\sin x+1)\cos x$

Let $u=v\sec x$ ,

Then $\dfrac{du}{dx}=(\sec x)\dfrac{dv}{dx}+v\sec x\tan x$

$\therefore(v\sec x)\left((\sec x)\dfrac{dv}{dx}+v\sec x\tan x\right)=v^2\sec^2x\tan x+(3\sin x+1)v\sec x+(\sin x+1)\cos x$

$(\sec^2x)v\dfrac{dv}{dx}+v^2\sec^2x\tan x=v^2\sec^2x\tan x+(3\sin x+1)v\sec x+(\sin x+1)\cos x$

$\dfrac{v}{\cos^2x}\dfrac{dv}{dx}=\dfrac{(3\sin x+1)v}{\cos x}+(\sin x+1)\cos x$

$v\dfrac{dv}{dx}=(3\sin x+1)v\cos x+(\sin x+1)\cos^3x$

Let $r=\sin x$ ,

Then $\dfrac{dv}{dx}=\dfrac{dv}{dr}\dfrac{dr}{dx}=(\cos x)\dfrac{dv}{dr}$

$\therefore v(\cos x)\dfrac{dv}{dr}=(3\sin x+1)v\cos x+(\sin x+1)\cos^3x$

$v\dfrac{dv}{dr}=(3\sin x+1)v+(\sin x+1)\cos^2x$



Let $s=r+\dfrac{1}{3}$ ,

Then $v\dfrac{dv}{ds}=3sv-\left(s-\dfrac{1}{3}+1\right)^2\left(s-\dfrac{1}{3}-1\right)$


Let $t=\dfrac{3s^2}{2}$ ,

Then $\dfrac{dv}{ds}=\dfrac{dv}{dt}\dfrac{dt}{ds}=3s\dfrac{dv}{dt}$




This exactly belongs to the ODE of the form http://science.fire.ustc.edu.cn/download/download1/book%5Cmathematics%5CHandbook%20of%20Exact%20Solutions%20for%20Ordinary%20Differential%20EquationsSecond%20Edition%5Cc2972_fm.pdf#page=132.

The general solution is $\begin{cases}t=\dfrac{b((2k-1)C\tau^k-(k-2)\tau-k-1)^2}{(C\tau^k+\tau+1)^2}\\v=-\dfrac{6b((k-1)^2C\tau^{k+1}+k^2C\tau^k+\tau)}{C\tau^k+\tau+1}\end{cases}$ , where $\begin{cases}\dfrac{2b(k^2-k+1)}{3}=\dfrac{4}{9}\\\dfrac{2b^\frac{3}{2}(2k-1)(k-2)(k+1)}{3}=\pm\dfrac{16\sqrt3}{81\sqrt2}\end{cases}$

$\begin{cases}\dfrac{3s^2}{2}=\dfrac{b((2k-1)C\tau^k-(k-2)\tau-k-1)^2}{(C\tau^k+\tau+1)^2}\\u\cos x=-\dfrac{6b((k-1)^2C\tau^{k+1}+k^2C\tau^k+\tau)}{C\tau^k+\tau+1}\end{cases}$ , where $\begin{cases}b(k^2-k+1)=\dfrac{2}{3}\\b^\frac{3}{2}(2k-1)(k-2)(k+1)=\pm\dfrac{4\sqrt6}{27}\end{cases}$

$\begin{cases}\left(\sin x+\dfrac{1}{3}\right)^2=\dfrac{2b((2k-1)C\tau^k-(k-2)\tau-k-1)^2}{3(C\tau^k+\tau+1)^2}\\(at-\cos x)\cos x=-\dfrac{6b((k-1)^2C\tau^{k+1}+k^2C\tau^k+\tau)}{C\tau^k+\tau+1}\end{cases}$ , where $\begin{cases}b(k^2-k+1)=\dfrac{2}{3}\\b^\frac{3}{2}(2k-1)(k-2)(k+1)=\pm\dfrac{4\sqrt6}{27}\end{cases}$

  • 1
    $\begingroup$ +1. Wow. How did you recognize the original equation is of the Abel type? $\endgroup$ – Hans Mar 14 at 21:04
  • $\begingroup$ @Hans Just trivially, because en.wikipedia.org/wiki/Abel_equation_of_the_first_kind $\endgroup$ – doraemonpaul Mar 19 at 5:24
  • $\begingroup$ Cool. The link in your answer is not working. It would be better if you list the title and author of the book. Can you apply the method in this paper as well hindawi.com/journals/ijmms/2011/387429/#B7? $\endgroup$ – Hans Mar 19 at 7:42
  • $\begingroup$ @Hans Later I find that this exactly matches the equation of page 132 of A. D. Polyanin and V. F. Zaitsev, Handbook of Exact Solutions for Ordinary Differential Equations. $\endgroup$ – doraemonpaul Mar 19 at 8:04
  • $\begingroup$ Thank you. I meant to ask you to put what you wrote in your answer as the text for your link which is not work, by the way, so as to make it clearer. $\endgroup$ – Hans Mar 19 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.