2.77   ODE No. 77

  1. Problem in Latex
  2. Mathematica input
  3. Maple input

\[ y'(x)-\cos (a y(x)+b x)=0 \] Mathematica : cpu = 0.277764 (sec), leaf count = 124

\[\left \{\left \{y(x)\to \frac {-b x-2 \tan ^{-1}\left (\frac {a \tanh \left (\frac {1}{2} \left (-x \sqrt {a^2-b^2}+c_1 \sqrt {a^2-b^2}\right )\right )}{\sqrt {a^2-b^2}}+\frac {b \tanh \left (\frac {1}{2} \left (-x \sqrt {a^2-b^2}+c_1 \sqrt {a^2-b^2}\right )\right )}{\sqrt {a^2-b^2}}\right )}{a}\right \}\right \}\] Maple : cpu = 0.056 (sec), leaf count = 54

\[ \left \{ y \left ( x \right ) ={\frac {1}{a} \left ( -bx+2\,\arctan \left ( {\frac {\tanh \left ( 1/2\,\sqrt { \left ( a-b \right ) \left ( a+b \right ) } \left ( x-{\it \_C1} \right ) \right ) \sqrt { \left ( a-b \right ) \left ( a+b \right ) }}{a-b}} \right ) \right ) } \right \} \]

Hand solution

\[ y^{\prime }=\cos \left ( ay+bx\right ) \]

This is separable after transformation of \(u=ay+bx\), hence \(u^{\prime }=ay^{\prime }+b\) or \(y^{\prime }=\frac {1}{a}\left ( u^{\prime }-b\right ) \). Therefore the above becomes

\begin {align*} \frac {1}{a}\left ( u^{\prime }-b\right ) & =\cos \left ( u\right ) \\ u^{\prime } & =a\cos u+b\\ \frac {du}{a\cos u+b} & =dx \end {align*}

This is the same as Kamke 76 (the problem before this), which we solved using half angle tan transformation, and the answer is

\[ u=2\arctan \left ( \frac {a+b}{\sqrt {b^{2}-a^{2}}}\tan \left ( \frac {1}{2}\sqrt {b^{2}-a^{2}}\left ( x+C\right ) \right ) \right ) \]

Since \(u=ay+bx\) then \(y=\frac {u-bx}{a}\), hence

\[ y=\frac {1}{a}\left ( 2\arctan \left ( \frac {a+b}{\sqrt {b^{2}-a^{2}}}\tan \left ( \frac {1}{2}\sqrt {b^{2}-a^{2}}\left ( x+C\right ) \right ) \right ) -bx\right ) \]

Verification

ode:=diff(y(x),x)=cos(a*y(x)+b*x); 
my_sol:=(1/a)*(2*arctan( (a+b)/sqrt(b^2-a^2) * tan(1/2*sqrt(b^2-a^2)*(x+_C1)))-b*x); 
odetest(y(x)=my_sol,ode); 
0