6.2 problem 2

6.2.1 Solving as linear ode
6.2.2 Solving as first order ode lie symmetry lookup ode
6.2.3 Solving as exact ode
6.2.4 Maple step by step solution

Internal problem ID [1031]
Internal file name [OUTPUT/1032_Sunday_June_05_2022_01_57_21_AM_47277048/index.tex]

Book: Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section: Chapter 2, First order equations. Exact equations. Section 2.5 Page 79
Problem number: 2.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "linear", "exactWithIntegrationFactor", "first_order_ode_lie_symmetry_lookup"

Maple gives the following as the ode type

[_linear]

\[ \boxed {3 y \cos \left (x \right )+2 x^{3} y+\left (3 \sin \left (x \right )+3\right ) y^{\prime }=-4 x \,{\mathrm e}^{x}} \]

6.2.1 Solving as linear ode

Entering Linear first order ODE solver. In canonical form a linear first order is \begin {align*} y^{\prime } + p(x)y &= q(x) \end {align*}

Where here \begin {align*} p(x) &=\frac {2 x^{3}+3 \cos \left (x \right )}{3 \sin \left (x \right )+3}\\ q(x) &=-\frac {4 x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )} \end {align*}

Hence the ode is \begin {align*} y^{\prime }+\frac {\left (2 x^{3}+3 \cos \left (x \right )\right ) y}{3 \sin \left (x \right )+3} = -\frac {4 x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )} \end {align*}

The integrating factor \(\mu \) is \[ \mu = {\mathrm e}^{\int \frac {2 x^{3}+3 \cos \left (x \right )}{3 \sin \left (x \right )+3}d x} \] The ode becomes \begin {align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}}\left ( \mu y\right ) &= \left (\mu \right ) \left (-\frac {4 x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}x}} \left ({\mathrm e}^{\int \frac {2 x^{3}+3 \cos \left (x \right )}{3 \sin \left (x \right )+3}d x} y\right ) &= \left ({\mathrm e}^{\int \frac {2 x^{3}+3 \cos \left (x \right )}{3 \sin \left (x \right )+3}d x}\right ) \left (-\frac {4 x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )}\right )\\ \mathrm {d} \left ({\mathrm e}^{\int \frac {2 x^{3}+3 \cos \left (x \right )}{3 \sin \left (x \right )+3}d x} y\right ) &= \left (-\frac {4 x \,{\mathrm e}^{x +\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}}}{3 \sin \left (x \right )+3}\right )\, \mathrm {d} x \end {align*}

Integrating gives \begin {align*} {\mathrm e}^{\int \frac {2 x^{3}+3 \cos \left (x \right )}{3 \sin \left (x \right )+3}d x} y &= \int {-\frac {4 x \,{\mathrm e}^{x +\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}}}{3 \sin \left (x \right )+3}\,\mathrm {d} x}\\ {\mathrm e}^{\int \frac {2 x^{3}+3 \cos \left (x \right )}{3 \sin \left (x \right )+3}d x} y &= \int -\frac {4 x \,{\mathrm e}^{x +\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}}}{3 \sin \left (x \right )+3}d x + c_{1} \end {align*}

Dividing both sides by the integrating factor \(\mu ={\mathrm e}^{\int \frac {2 x^{3}+3 \cos \left (x \right )}{3 \sin \left (x \right )+3}d x}\) results in \begin {align*} y &= {\mathrm e}^{-\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}} \left (\int -\frac {4 x \,{\mathrm e}^{x +\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}}}{3 \sin \left (x \right )+3}d x \right )+c_{1} {\mathrm e}^{-\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}} \end {align*}

which simplifies to \begin {align*} y &= -\frac {{\mathrm e}^{-\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}} \left (4 \left (\int \frac {x \,{\mathrm e}^{x +\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}}}{1+\sin \left (x \right )}d x \right )-3 c_{1} \right )}{3} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\frac {{\mathrm e}^{-\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}} \left (4 \left (\int \frac {x \,{\mathrm e}^{x +\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}}}{1+\sin \left (x \right )}d x \right )-3 c_{1} \right )}{3} \\ \end{align*}

Figure 246: Slope field plot

Verification of solutions

\[ y = -\frac {{\mathrm e}^{-\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}} \left (4 \left (\int \frac {x \,{\mathrm e}^{x +\frac {\left (\int \frac {2 x^{3}+3 \cos \left (x \right )}{1+\sin \left (x \right )}d x \right )}{3}}}{1+\sin \left (x \right )}d x \right )-3 c_{1} \right )}{3} \] Verified OK.

6.2.2 Solving as first order ode lie symmetry lookup ode

Writing the ode as \begin {align*} y^{\prime }&=-\frac {2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )}{3 \left (1+\sin \left (x \right )\right )}\\ y^{\prime }&= \omega \left ( x,y\right ) \end {align*}

The condition of Lie symmetry is the linearized PDE given by \begin {align*} \eta _{x}+\omega \left ( \eta _{y}-\xi _{x}\right ) -\omega ^{2}\xi _{y}-\omega _{x}\xi -\omega _{y}\eta =0\tag {A} \end {align*}

The type of this ode is known. It is of type linear. Therefore we do not need to solve the PDE (A), and can just use the lookup table shown below to find \(\xi ,\eta \)

Table 179: Lie symmetry infinitesimal lookup table for known first order ODE’s

ODE class

Form

\(\xi \)

\(\eta \)

linear ode

\(y'=f(x) y(x) +g(x)\)

\(0\)

\(e^{\int fdx}\)

separable ode

\(y^{\prime }=f\left ( x\right ) g\left ( y\right ) \)

\(\frac {1}{f}\)

\(0\)

quadrature ode

\(y^{\prime }=f\left ( x\right ) \)

\(0\)

\(1\)

quadrature ode

\(y^{\prime }=g\left ( y\right ) \)

\(1\)

\(0\)

homogeneous ODEs of Class A

\(y^{\prime }=f\left ( \frac {y}{x}\right ) \)

\(x\)

\(y\)

homogeneous ODEs of Class C

\(y^{\prime }=\left ( a+bx+cy\right ) ^{\frac {n}{m}}\)

\(1\)

\(-\frac {b}{c}\)

homogeneous class D

\(y^{\prime }=\frac {y}{x}+g\left ( x\right ) F\left (\frac {y}{x}\right ) \)

\(x^{2}\)

\(xy\)

First order special form ID 1

\(y^{\prime }=g\left ( x\right ) e^{h\left (x\right ) +by}+f\left ( x\right ) \)

\(\frac {e^{-\int bf\left ( x\right )dx-h\left ( x\right ) }}{g\left ( x\right ) }\)

\(\frac {f\left ( x\right )e^{-\int bf\left ( x\right ) dx-h\left ( x\right ) }}{g\left ( x\right ) }\)

polynomial type ode

\(y^{\prime }=\frac {a_{1}x+b_{1}y+c_{1}}{a_{2}x+b_{2}y+c_{2}}\)

\(\frac {a_{1}b_{2}x-a_{2}b_{1}x-b_{1}c_{2}+b_{2}c_{1}}{a_{1}b_{2}-a_{2}b_{1}}\)

\(\frac {a_{1}b_{2}y-a_{2}b_{1}y-a_{1}c_{2}-a_{2}c_{1}}{a_{1}b_{2}-a_{2}b_{1}}\)

Bernoulli ode

\(y^{\prime }=f\left ( x\right ) y+g\left ( x\right ) y^{n}\)

\(0\)

\(e^{-\int \left ( n-1\right ) f\left ( x\right ) dx}y^{n}\)

Reduced Riccati

\(y^{\prime }=f_{1}\left ( x\right ) y+f_{2}\left ( x\right )y^{2}\)

\(0\)

\(e^{-\int f_{1}dx}\)

The above table shows that \begin {align*} \xi \left (x,y\right ) &=0\\ \tag {A1} \eta \left (x,y\right ) &={\mathrm e}^{-i x +\frac {4 x^{3}}{3 \left ({\mathrm e}^{i x}+i\right )}-2 \ln \left ({\mathrm e}^{i x}+i\right )+2 \ln \left ({\mathrm e}^{i x}\right )+\frac {4 i x^{3}}{3}-4 x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+8 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )-8 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )} \end {align*}

The next step is to determine the canonical coordinates \(R,S\). The canonical coordinates map \(\left ( x,y\right ) \to \left ( R,S \right )\) where \(\left ( R,S \right )\) are the canonical coordinates which make the original ode become a quadrature and hence solved by integration.

The characteristic pde which is used to find the canonical coordinates is \begin {align*} \frac {d x}{\xi } &= \frac {d y}{\eta } = dS \tag {1} \end {align*}

The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial x} + \eta \frac {\partial }{\partial y}\right ) S(x,y) = 1\). Starting with the first pair of ode’s in (1) gives an ode to solve for the independent variable \(R\) in the canonical coordinates, where \(S(R)\). Since \(\xi =0\) then in this special case \begin {align*} R = x \end {align*}

\(S\) is found from \begin {align*} S &= \int { \frac {1}{\eta }} dy\\ &= \int { \frac {1}{{\mathrm e}^{-i x +\frac {4 x^{3}}{3 \left ({\mathrm e}^{i x}+i\right )}-2 \ln \left ({\mathrm e}^{i x}+i\right )+2 \ln \left ({\mathrm e}^{i x}\right )+\frac {4 i x^{3}}{3}-4 x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+8 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )-8 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )}}} dy \end {align*}

Which results in \begin {align*} S&= \left ({\mathrm e}^{i x}+i\right )^{2} {\mathrm e}^{-i x -\frac {4 x^{3}}{3 \left ({\mathrm e}^{i x}+i\right )}-\frac {4 i x^{3}}{3}+4 x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )-8 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+8 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )} y \end {align*}

Now that \(R,S\) are found, we need to setup the ode in these coordinates. This is done by evaluating \begin {align*} \frac {dS}{dR} &= \frac { S_{x} + \omega (x,y) S_{y} }{ R_{x} + \omega (x,y) R_{y} }\tag {2} \end {align*}

Where in the above \(R_{x},R_{y},S_{x},S_{y}\) are all partial derivatives and \(\omega (x,y)\) is the right hand side of the original ode given by \begin {align*} \omega (x,y) &= -\frac {2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )}{3 \left (1+\sin \left (x \right )\right )} \end {align*}

Evaluating all the partial derivatives gives \begin {align*} R_{x} &= 1\\ R_{y} &= 0\\ S_{x} &= \frac {4 \left (\left (-3 i \pi x +6 x \ln \left ({\mathrm e}^{i x}+i\right )-6 x \ln \left (1-i {\mathrm e}^{i x}\right )+\frac {3 i}{4}\right ) {\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x \left (x^{2}+\frac {3}{2} \pi x -\frac {3}{4}\right ) {\mathrm e}^{i x}+6 \pi \,x^{2}-3 x}{3 \,{\mathrm e}^{i x}+3 i}}+\left (3 i \pi x -6 x \ln \left ({\mathrm e}^{i x}+i\right )+6 x \ln \left (1-i {\mathrm e}^{i x}\right )+\frac {3 i}{4}\right ) {\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i \left (x^{2}+\frac {3}{2} \pi x +\frac {3}{4}\right ) x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+3 x}{3 \,{\mathrm e}^{i x}+3 i}}+\left (i x^{2}+12 i \ln \left ({\mathrm e}^{i x}+i\right )-12 i \ln \left (1-i {\mathrm e}^{i x}\right )+6 \pi \right ) {\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i \left (x +\frac {3 \pi }{2}\right ) x^{2} {\mathrm e}^{i x}+6 \pi \,x^{2}}{3 \,{\mathrm e}^{i x}+3 i}} x \right ) \left ({\mathrm e}^{i x}+i\right )^{\frac {4 x^{2} \left ({\mathrm e}^{2 i x}-1+2 i {\mathrm e}^{i x}\right )}{\left ({\mathrm e}^{i x}+i\right )^{2}}} y}{3}\\ S_{y} &= {\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+12 \left (x^{2}+\frac {1}{2}\right ) \left ({\mathrm e}^{i x}+i\right ) \ln \left ({\mathrm e}^{i x}+i\right )-4 i \left (x^{2}+\frac {3}{2} \pi x +\frac {3}{4}\right ) x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+3 x}{3 \,{\mathrm e}^{i x}+3 i}} \end {align*}

Substituting all the above in (2) and simplifying gives the ode in canonical coordinates. \begin {align*} \frac {dS}{dR} &= -\frac {4 x \sec \left (x \right ) \left (\sec \left (x \right )-\tan \left (x \right )\right ) {\mathrm e}^{\frac {24 x \left ({\mathrm e}^{i x}+i\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i {\mathrm e}^{i x}-24\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+12 \left (x^{2}+\frac {1}{2}\right ) \left (i {\mathrm e}^{i x}-1\right ) \ln \left ({\mathrm e}^{i x}+i\right )+6 x \left (\left (\frac {2}{3} x^{2}+\pi x +\frac {1}{2}+\frac {1}{2} i\right ) {\mathrm e}^{i x}+i \pi x -\frac {1}{2}+\frac {i}{2}\right )}{3 i {\mathrm e}^{i x}-3}}}{3}+\frac {4 \left (-\frac {\left (\sec \left (x \right )-\tan \left (x \right )\right ) \left (x^{3} \sec \left (x \right )+\frac {3}{2}\right ) {\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+12 \left (x^{2}+\frac {1}{2}\right ) \left ({\mathrm e}^{i x}+i\right ) \ln \left ({\mathrm e}^{i x}+i\right )-4 i \left (x^{2}+\frac {3}{2} \pi x +\frac {3}{4}\right ) x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+3 x}{3 \,{\mathrm e}^{i x}+3 i}}}{2}+\left (\left (-3 i \pi x +6 x \ln \left ({\mathrm e}^{i x}+i\right )-6 x \ln \left (1-i {\mathrm e}^{i x}\right )+\frac {3 i}{4}\right ) {\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x \left (x^{2}+\frac {3}{2} \pi x -\frac {3}{4}\right ) {\mathrm e}^{i x}+6 \pi \,x^{2}-3 x}{3 \,{\mathrm e}^{i x}+3 i}}+\left (3 i \pi x -6 x \ln \left ({\mathrm e}^{i x}+i\right )+6 x \ln \left (1-i {\mathrm e}^{i x}\right )+\frac {3 i}{4}\right ) {\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i \left (x^{2}+\frac {3}{2} \pi x +\frac {3}{4}\right ) x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+3 x}{3 \,{\mathrm e}^{i x}+3 i}}+\left (i x^{2}+12 i \ln \left ({\mathrm e}^{i x}+i\right )-12 i \ln \left (1-i {\mathrm e}^{i x}\right )+6 \pi \right ) {\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i \left (x +\frac {3 \pi }{2}\right ) x^{2} {\mathrm e}^{i x}+6 \pi \,x^{2}}{3 \,{\mathrm e}^{i x}+3 i}} x \right ) \left ({\mathrm e}^{i x}+i\right )^{\frac {4 x^{2} \left ({\mathrm e}^{2 i x}-1+2 i {\mathrm e}^{i x}\right )}{\left ({\mathrm e}^{i x}+i\right )^{2}}}\right ) y}{3}\tag {2A} \end {align*}

We now need to express the RHS as function of \(R\) only. This is done by solving for \(x,y\) in terms of \(R,S\) from the result obtained earlier and simplifying. This gives \begin {align*} \frac {dS}{dR} &= -\frac {4 \left ({\mathrm e}^{i R}+i\right )^{\frac {2 \left (2 R^{2}-1\right ) \left ({\mathrm e}^{2 i R}-1+2 i {\mathrm e}^{i R}\right )}{\left ({\mathrm e}^{i R}+i\right )^{2}}} R \left (4 i {\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i R}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-4 \left (\left (6 i {\mathrm e}^{i R}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (i R^{2}+\frac {3}{2} i R \pi -\frac {3}{4}-\frac {3}{2} i\right ) {\mathrm e}^{i R}-\frac {3 \pi R}{2}+\frac {3}{2}-\frac {3 i}{4}\right ) R}{3 \,{\mathrm e}^{i R}+3 i}}-4 i {\mathrm e}^{\frac {24 R \left ({\mathrm e}^{i R}+i\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (24 i {\mathrm e}^{i R}-24\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )+\left (6 \pi \,R^{2}+4 R^{3}+3 i R \right ) {\mathrm e}^{i R}+6 i R^{2} \pi -3 R}{3 i {\mathrm e}^{i R}-3}}-6 \,{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i R}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-4 \left (\left (6 i {\mathrm e}^{i R}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (i R^{2}+\frac {3}{2} i R \pi -\frac {3}{4}-\frac {3}{4} i\right ) {\mathrm e}^{i R}-\frac {3 \pi R}{2}+\frac {3}{4}-\frac {3 i}{4}\right ) R}{3 \,{\mathrm e}^{i R}+3 i}}+{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i R}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-4 \left (\left (6 i {\mathrm e}^{i R}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (i R^{2}+\frac {3}{2} i R \pi -\frac {3}{4}-\frac {9}{4} i\right ) {\mathrm e}^{i R}-\frac {3 \pi R}{2}+\frac {9}{4}-\frac {3 i}{4}\right ) R}{3 \,{\mathrm e}^{i R}+3 i}}+{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i R}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-4 \left (\left (6 i {\mathrm e}^{i R}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (i R^{2}+\frac {3}{2} i R \pi -\frac {3}{4}+\frac {3}{4} i\right ) {\mathrm e}^{i R}-\frac {3 \pi R}{2}-\frac {3}{4}-\frac {3 i}{4}\right ) R}{3 \,{\mathrm e}^{i R}+3 i}}\right )}{3 \sin \left (R \right )+3} \end {align*}

The above is a quadrature ode. This is the whole point of Lie symmetry method. It converts an ode, no matter how complicated it is, to one that can be solved by integration when the ode is in the canonical coordiates \(R,S\). Integrating the above gives \begin {align*} S \left (R \right ) = \int \frac {4 \left (4 i {\mathrm e}^{\frac {6 R^{2} {\mathrm e}^{i R} \pi +4 R^{3} {\mathrm e}^{i R}+6 i R^{2} \pi +24 \,{\mathrm e}^{i R} \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R +24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right ) {\mathrm e}^{i R}+3 i R \,{\mathrm e}^{i R}+24 i \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R -24 \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-3 R}{3 i {\mathrm e}^{i R}-3}}-4 i {\mathrm e}^{\frac {-6 i R^{2} {\mathrm e}^{i R} \pi -4 i R^{3} {\mathrm e}^{i R}-24 i {\mathrm e}^{i R} \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R +6 i R \,{\mathrm e}^{i R}+6 \pi \,R^{2}+24 \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right ) {\mathrm e}^{i R}+3 R \,{\mathrm e}^{i R}+24 \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R +24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )+3 i R -6 R}{3 \,{\mathrm e}^{i R}+3 i}}+6 \,{\mathrm e}^{\frac {-6 i R^{2} {\mathrm e}^{i R} \pi -4 i R^{3} {\mathrm e}^{i R}-24 i {\mathrm e}^{i R} \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R +3 i R \,{\mathrm e}^{i R}+6 \pi \,R^{2}+24 \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right ) {\mathrm e}^{i R}+24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )+24 \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R +3 R \,{\mathrm e}^{i R}+3 i R -3 R}{3 \,{\mathrm e}^{i R}+3 i}}-{\mathrm e}^{\frac {-6 i R^{2} {\mathrm e}^{i R} \pi -4 i R^{3} {\mathrm e}^{i R}-24 i {\mathrm e}^{i R} \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R +9 i R \,{\mathrm e}^{i R}+6 \pi \,R^{2}+24 \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right ) {\mathrm e}^{i R}+3 R \,{\mathrm e}^{i R}+24 \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R +24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )+3 i R -9 R}{3 \,{\mathrm e}^{i R}+3 i}}-{\mathrm e}^{\frac {-6 i R^{2} {\mathrm e}^{i R} \pi -4 i R^{3} {\mathrm e}^{i R}-24 i {\mathrm e}^{i R} \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R -3 i R \,{\mathrm e}^{i R}+6 \pi \,R^{2}+24 \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right ) {\mathrm e}^{i R}+3 R \,{\mathrm e}^{i R}+24 \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right ) R +24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )+3 i R +3 R}{3 \,{\mathrm e}^{i R}+3 i}}\right ) R \left ({\mathrm e}^{i R}+i\right )^{\frac {2 \left (2 R^{2}-1\right ) \left ({\mathrm e}^{2 i R}-1+2 i {\mathrm e}^{i R}\right )}{\left ({\mathrm e}^{i R}+i\right )^{2}}}}{3 \sin \left (R \right )+3}d R +c_{1}\tag {4} \end {align*}

To complete the solution, we just need to transform (4) back to \(x,y\) coordinates. This results in \begin {align*} y \,{\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+12 \left (x^{2}+\frac {1}{2}\right ) \left ({\mathrm e}^{i x}+i\right ) \ln \left ({\mathrm e}^{i x}+i\right )-4 i \left (x^{2}+\frac {3}{2} \pi x +\frac {3}{4}\right ) x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+3 x}{3 \,{\mathrm e}^{i x}+3 i}} = \int \frac {4 \left (4 i {\mathrm e}^{\frac {6 \pi \,{\mathrm e}^{i x} x^{2}+4 \,{\mathrm e}^{i x} x^{3}+24 x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}+6 i x^{2} \pi -24 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-3 x +24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}+3 i x \,{\mathrm e}^{i x}+24 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )}{3 i {\mathrm e}^{i x}-3}}-4 i {\mathrm e}^{\frac {-6 i {\mathrm e}^{i x} \pi \,x^{2}-4 i x^{3} {\mathrm e}^{i x}-24 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}-6 x +6 i x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+3 i x +24 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}+3 x \,{\mathrm e}^{i x}+24 x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )}{3 \,{\mathrm e}^{i x}+3 i}}+6 \,{\mathrm e}^{\frac {-6 i {\mathrm e}^{i x} \pi \,x^{2}-4 i x^{3} {\mathrm e}^{i x}-24 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}-3 x +3 i x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+3 i x +24 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}+3 x \,{\mathrm e}^{i x}+24 x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )}{3 \,{\mathrm e}^{i x}+3 i}}-{\mathrm e}^{\frac {-6 i {\mathrm e}^{i x} \pi \,x^{2}-4 i x^{3} {\mathrm e}^{i x}-24 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}-9 x +9 i x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+3 i x +24 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}+3 x \,{\mathrm e}^{i x}+24 x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )}{3 \,{\mathrm e}^{i x}+3 i}}-{\mathrm e}^{\frac {-6 i {\mathrm e}^{i x} \pi \,x^{2}-4 i x^{3} {\mathrm e}^{i x}-24 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}-3 i x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+3 i x +24 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}+3 x \,{\mathrm e}^{i x}+24 x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+3 x}{3 \,{\mathrm e}^{i x}+3 i}}\right ) x \left ({\mathrm e}^{i x}+i\right )^{\frac {2 \left (2 x^{2}-1\right ) \left ({\mathrm e}^{2 i x}-1+2 i {\mathrm e}^{i x}\right )}{\left ({\mathrm e}^{i x}+i\right )^{2}}}}{3 \sin \left (x \right )+3}d x +c_{1} \end {align*}

Which simplifies to \begin {align*} y \,{\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+12 \left (x^{2}+\frac {1}{2}\right ) \left ({\mathrm e}^{i x}+i\right ) \ln \left ({\mathrm e}^{i x}+i\right )-4 i \left (x^{2}+\frac {3}{2} \pi x +\frac {3}{4}\right ) x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+3 x}{3 \,{\mathrm e}^{i x}+3 i}}+\frac {4 \left (\int \frac {\left (4 i {\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 \left (\left (6 i {\mathrm e}^{i x}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (i x^{2}+\frac {3}{2} i \pi x -\frac {3}{4}-\frac {3}{2} i\right ) {\mathrm e}^{i x}-\frac {3 \pi x}{2}+\frac {3}{2}-\frac {3 i}{4}\right ) x}{3 \,{\mathrm e}^{i x}+3 i}}-4 i {\mathrm e}^{\frac {24 x \left ({\mathrm e}^{i x}+i\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i {\mathrm e}^{i x}-24\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+\left (6 \pi \,x^{2}+4 x^{3}+3 i x \right ) {\mathrm e}^{i x}+6 i x^{2} \pi -3 x}{3 i {\mathrm e}^{i x}-3}}-6 \,{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 \left (\left (6 i {\mathrm e}^{i x}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (i x^{2}+\frac {3}{2} i \pi x -\frac {3}{4}-\frac {3}{4} i\right ) {\mathrm e}^{i x}-\frac {3 \pi x}{2}+\frac {3}{4}-\frac {3 i}{4}\right ) x}{3 \,{\mathrm e}^{i x}+3 i}}+{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 \left (\left (6 i {\mathrm e}^{i x}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (i x^{2}+\frac {3}{2} i \pi x -\frac {3}{4}-\frac {9}{4} i\right ) {\mathrm e}^{i x}-\frac {3 \pi x}{2}+\frac {9}{4}-\frac {3 i}{4}\right ) x}{3 \,{\mathrm e}^{i x}+3 i}}+{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 \left (\left (6 i {\mathrm e}^{i x}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (i x^{2}+\frac {3}{2} i \pi x -\frac {3}{4}+\frac {3}{4} i\right ) {\mathrm e}^{i x}-\frac {3 \pi x}{2}-\frac {3}{4}-\frac {3 i}{4}\right ) x}{3 \,{\mathrm e}^{i x}+3 i}}\right ) x \left ({\mathrm e}^{i x}+i\right )^{\frac {2 \left (2 x^{2}-1\right ) \left ({\mathrm e}^{2 i x}-1+2 i {\mathrm e}^{i x}\right )}{\left ({\mathrm e}^{i x}+i\right )^{2}}}}{1+\sin \left (x \right )}d x \right )}{3}-c_{1} = 0 \end {align*}

Which gives \begin {align*} \text {Expression too large to display} \end {align*}

The following diagram shows solution curves of the original ode and how they transform in the canonical coordinates space using the mapping shown.

Original ode in \(x,y\) coordinates

Canonical coordinates transformation

ODE in canonical coordinates \((R,S)\)

\( \frac {dy}{dx} = -\frac {2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )}{3 \left (1+\sin \left (x \right )\right )}\)

\( \frac {d S}{d R} = -\frac {4 \left ({\mathrm e}^{i R}+i\right )^{\frac {2 \left (2 R^{2}-1\right ) \left ({\mathrm e}^{2 i R}-1+2 i {\mathrm e}^{i R}\right )}{\left ({\mathrm e}^{i R}+i\right )^{2}}} R \left (4 i {\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i R}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-4 \left (\left (6 i {\mathrm e}^{i R}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (i R^{2}+\frac {3}{2} i R \pi -\frac {3}{4}-\frac {3}{2} i\right ) {\mathrm e}^{i R}-\frac {3 \pi R}{2}+\frac {3}{2}-\frac {3 i}{4}\right ) R}{3 \,{\mathrm e}^{i R}+3 i}}-4 i {\mathrm e}^{\frac {24 R \left ({\mathrm e}^{i R}+i\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (24 i {\mathrm e}^{i R}-24\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )+\left (6 \pi \,R^{2}+4 R^{3}+3 i R \right ) {\mathrm e}^{i R}+6 i R^{2} \pi -3 R}{3 i {\mathrm e}^{i R}-3}}-6 \,{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i R}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-4 \left (\left (6 i {\mathrm e}^{i R}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (i R^{2}+\frac {3}{2} i R \pi -\frac {3}{4}-\frac {3}{4} i\right ) {\mathrm e}^{i R}-\frac {3 \pi R}{2}+\frac {3}{4}-\frac {3 i}{4}\right ) R}{3 \,{\mathrm e}^{i R}+3 i}}+{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i R}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-4 \left (\left (6 i {\mathrm e}^{i R}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (i R^{2}+\frac {3}{2} i R \pi -\frac {3}{4}-\frac {9}{4} i\right ) {\mathrm e}^{i R}-\frac {3 \pi R}{2}+\frac {9}{4}-\frac {3 i}{4}\right ) R}{3 \,{\mathrm e}^{i R}+3 i}}+{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i R}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i R}\right )-4 \left (\left (6 i {\mathrm e}^{i R}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i R}\right )+\left (i R^{2}+\frac {3}{2} i R \pi -\frac {3}{4}+\frac {3}{4} i\right ) {\mathrm e}^{i R}-\frac {3 \pi R}{2}-\frac {3}{4}-\frac {3 i}{4}\right ) R}{3 \,{\mathrm e}^{i R}+3 i}}\right )}{3 \sin \left (R \right )+3}\)

\(\!\begin {aligned} R&= x\\ S&= y \,{\mathrm e}^{\frac {\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+12 \left (x^{2}+\frac {1}{2}\right ) \left ({\mathrm e}^{i x}+i\right ) \ln \left ({\mathrm e}^{i x}+i\right )-4 i \left (x^{2}+\frac {3}{2} \pi x +\frac {3}{4}\right ) x \,{\mathrm e}^{i x}+6 \pi \,x^{2}+3 x}{3 \,{\mathrm e}^{i x}+3 i}} \end {aligned} \)

Summary

The solution(s) found are the following \begin{align*} \tag{1} \text {Expression too large to display} \\ \end{align*}

Figure 247: Slope field plot

Verification of solutions

\[ \text {Expression too large to display} \] Verified OK.

6.2.3 Solving as exact ode

Entering Exact first order ODE solver. (Form one type)

To solve an ode of the form\begin {equation} M\left ( x,y\right ) +N\left ( x,y\right ) \frac {dy}{dx}=0\tag {A} \end {equation} We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant, that satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives\[ \frac {d}{dx}\phi \left ( x,y\right ) =0 \] Hence\begin {equation} \frac {\partial \phi }{\partial x}+\frac {\partial \phi }{\partial y}\frac {dy}{dx}=0\tag {B} \end {equation} Comparing (A,B) shows that\begin {align*} \frac {\partial \phi }{\partial x} & =M\\ \frac {\partial \phi }{\partial y} & =N \end {align*}

But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that\[ \frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\] If the above condition is satisfied, then the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is \[ M(x,y) \mathop {\mathrm {d}x}+ N(x,y) \mathop {\mathrm {d}y}=0 \tag {1A} \] Therefore \begin {align*} \left (3 \sin \left (x \right )+3\right )\mathop {\mathrm {d}y} &= \left (-2 x^{3} y -4 x \,{\mathrm e}^{x}-3 y \cos \left (x \right )\right )\mathop {\mathrm {d}x}\\ \left (2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )\right )\mathop {\mathrm {d}x} + \left (3 \sin \left (x \right )+3\right )\mathop {\mathrm {d}y} &= 0 \tag {2A} \end {align*}

Comparing (1A) and (2A) shows that \begin {align*} M(x,y) &= 2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )\\ N(x,y) &= 3 \sin \left (x \right )+3 \end {align*}

The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied \[ \frac {\partial M}{\partial y} = \frac {\partial N}{\partial x} \] Using result found above gives \begin {align*} \frac {\partial M}{\partial y} &= \frac {\partial }{\partial y} \left (2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )\right )\\ &= 2 x^{3}+3 \cos \left (x \right ) \end {align*}

And \begin {align*} \frac {\partial N}{\partial x} &= \frac {\partial }{\partial x} \left (3 \sin \left (x \right )+3\right )\\ &= 3 \cos \left (x \right ) \end {align*}

Since \(\frac {\partial M}{\partial y} \neq \frac {\partial N}{\partial x}\), then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating factor to make it exact. Let \begin {align*} A &= \frac {1}{N} \left (\frac {\partial M}{\partial y} - \frac {\partial N}{\partial x} \right ) \\ &=\frac {1}{3 \sin \left (x \right )+3}\left ( \left ( 2 x^{3}+3 \cos \left (x \right )\right ) - \left (3 \cos \left (x \right ) \right ) \right ) \\ &=\frac {2 x^{3}}{3 \sin \left (x \right )+3} \end {align*}

Since \(A\) does not depend on \(y\), then it can be used to find an integrating factor. The integrating factor \(\mu \) is \begin {align*} \mu &= e^{ \int A \mathop {\mathrm {d}x} } \\ &= e^{\int \frac {2 x^{3}}{3 \sin \left (x \right )+3}\mathop {\mathrm {d}x} } \end {align*}

The result of integrating gives \begin {align*} \mu &= e^{-\frac {4 x^{3}}{3 \left ({\mathrm e}^{i x}+i\right )}-\frac {4 i x^{3}}{3}+4 x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )-8 i x \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+8 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right ) } \\ &= {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}} \end {align*}

\(M\) and \(N\) are multiplied by this integrating factor, giving new \(M\) and new \(N\) which are called \(\overline {M}\) and \(\overline {N}\) for now so not to confuse them with the original \(M\) and \(N\). \begin {align*} \overline {M} &=\mu M \\ &= {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\left (2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )\right ) \\ &= \left (2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}} \end {align*}

And \begin {align*} \overline {N} &=\mu N \\ &= {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\left (3 \sin \left (x \right )+3\right ) \\ &= 3 \left (1+\sin \left (x \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}} \end {align*}

Now a modified ODE is ontained from the original ODE, which is exact and can be solved. The modified ODE is \begin {align*} \overline {M} + \overline {N} \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}x}} &= 0 \\ \left (\left (2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\right ) + \left (3 \left (1+\sin \left (x \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\right ) \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}x}} &= 0 \end {align*}

The following equations are now set up to solve for the function \(\phi \left (x,y\right )\) \begin {align*} \frac {\partial \phi }{\partial x } &= \overline {M}\tag {1} \\ \frac {\partial \phi }{\partial y } &= \overline {N}\tag {2} \end {align*}

Integrating (1) w.r.t. \(x\) gives \begin{align*} \int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int \overline {M}\mathop {\mathrm {d}x} \\ \int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int \left (2 x^{3} y +4 x \,{\mathrm e}^{x}+3 y \cos \left (x \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\mathop {\mathrm {d}x} \\ \tag{3} \phi &= \int _{}^{x}\left (2 \textit {\_a}^{3} y +4 \textit {\_a} \,{\mathrm e}^{\textit {\_a}}+3 y \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a}+ f(y) \\ \end{align*} Where \(f(y)\) is used for the constant of integration since \(\phi \) is a function of both \(x\) and \(y\). Taking derivative of equation (3) w.r.t \(y\) gives \begin{equation} \tag{4} \frac {\partial \phi }{\partial y} = \int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a}+f'(y) \end{equation} But equation (2) says that \(\frac {\partial \phi }{\partial y} = 3 \left (1+\sin \left (x \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\). Therefore equation (4) becomes \begin{equation} \tag{5} 3 \left (1+\sin \left (x \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}} = \int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a}+f'(y) \end{equation} Solving equation (5) for \( f'(y)\) gives \begin{align*} f'(y) &= 3 \,{\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}} \sin \left (x \right )-\left (\int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} \right )+3 \,{\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}} \\ &= -\left (\int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} \right )+\left (3 \sin \left (x \right )+3\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\\ \end{align*} Integrating the above w.r.t \(y\) results in \begin{align*} \int f'(y) \mathop {\mathrm {d}y} &= \int \left ( -\left (\int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} \right )+\left (3 \sin \left (x \right )+3\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\right ) \mathop {\mathrm {d}y} \\ f(y) &= \left (-\left (\int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} \right )+\left (3 \sin \left (x \right )+3\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\right ) y+ c_{1} \\ \end{align*} Where \(c_{1}\) is constant of integration. Substituting result found above for \(f(y)\) into equation (3) gives \(\phi \) \[ \phi = \int _{}^{x}\left (2 \textit {\_a}^{3} y +4 \textit {\_a} \,{\mathrm e}^{\textit {\_a}}+3 y \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} +\left (-\left (\int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} \right )+\left (3 \sin \left (x \right )+3\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\right ) y+ c_{1} \] But since \(\phi \) itself is a constant function, then let \(\phi =c_{2}\) where \(c_{2}\) is new constant and combining \(c_{1}\) and \(c_{2}\) constants into new constant \(c_{1}\) gives the solution as \[ c_{1} = \int _{}^{x}\left (2 \textit {\_a}^{3} y +4 \textit {\_a} \,{\mathrm e}^{\textit {\_a}}+3 y \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} +\left (-\left (\int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} \right )+\left (3 \sin \left (x \right )+3\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\right ) y \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} \int _{}^{x}\left (2 \textit {\_a}^{3} y+4 \textit {\_a} \,{\mathrm e}^{\textit {\_a}}+3 y \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} +\left (-\left (\int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} \right )+\left (3 \sin \left (x \right )+3\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\right ) y &= c_{1} \\ \end{align*}

Figure 248: Slope field plot

Verification of solutions

\[ \int _{}^{x}\left (2 \textit {\_a}^{3} y+4 \textit {\_a} \,{\mathrm e}^{\textit {\_a}}+3 y \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} +\left (-\left (\int _{}^{x}\left (2 \textit {\_a}^{3}+3 \cos \left (\textit {\_a} \right )\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i \textit {\_a}}+i\right ) \textit {\_a}^{2} \ln \left (1-i {\mathrm e}^{i \textit {\_a}}\right )+\left (-24 i \textit {\_a} \,{\mathrm e}^{i \textit {\_a}}+24 \textit {\_a} \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i \textit {\_a}}\right )+\left (24 i+24 \,{\mathrm e}^{i \textit {\_a}}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i \textit {\_a}}\right )-4 i \textit {\_a}^{3} {\mathrm e}^{i \textit {\_a}}}{3 \,{\mathrm e}^{i \textit {\_a}}+3 i}}d \textit {\_a} \right )+\left (3 \sin \left (x \right )+3\right ) {\mathrm e}^{\frac {12 \left ({\mathrm e}^{i x}+i\right ) x^{2} \ln \left (1-i {\mathrm e}^{i x}\right )+\left (-24 i x \,{\mathrm e}^{i x}+24 x \right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 i x^{3} {\mathrm e}^{i x}}{3 \,{\mathrm e}^{i x}+3 i}}\right ) y = c_{1} \] Verified OK.

6.2.4 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & 3 y \cos \left (x \right )+2 x^{3} y+\left (3 \sin \left (x \right )+3\right ) y^{\prime }=-4 x \,{\mathrm e}^{x} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {-3 y \cos \left (x \right )-4 x \,{\mathrm e}^{x}-2 x^{3} y}{3 \sin \left (x \right )+3} \\ \bullet & {} & \textrm {Collect w.r.t.}\hspace {3pt} y\hspace {3pt}\textrm {and simplify}\hspace {3pt} \\ {} & {} & y^{\prime }=-\frac {\left (2 x^{3}+3 \cos \left (x \right )\right ) y}{3 \left (1+\sin \left (x \right )\right )}-\frac {4 x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & y^{\prime }+\frac {\left (2 x^{3}+3 \cos \left (x \right )\right ) y}{3 \left (1+\sin \left (x \right )\right )}=-\frac {4 x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )} \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (x \right ) \\ {} & {} & \mu \left (x \right ) \left (y^{\prime }+\frac {\left (2 x^{3}+3 \cos \left (x \right )\right ) y}{3 \left (1+\sin \left (x \right )\right )}\right )=-\frac {4 \mu \left (x \right ) x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )} \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d x}\left (y \mu \left (x \right )\right ) \\ {} & {} & \mu \left (x \right ) \left (y^{\prime }+\frac {\left (2 x^{3}+3 \cos \left (x \right )\right ) y}{3 \left (1+\sin \left (x \right )\right )}\right )=y^{\prime } \mu \left (x \right )+y \mu ^{\prime }\left (x \right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \mu ^{\prime }\left (x \right ) \\ {} & {} & \mu ^{\prime }\left (x \right )=\frac {\mu \left (x \right ) \left (2 x^{3}+3 \cos \left (x \right )\right )}{3 \left (1+\sin \left (x \right )\right )} \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (x \right )={\mathrm e}^{\frac {-4 \,\mathrm {I} x^{3} {\mathrm e}^{\mathrm {I} x}+12 x^{2} \ln \left (\mathrm {-I} \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )\right ) {\mathrm e}^{\mathrm {I} x}+12 \,\mathrm {I} \ln \left (\mathrm {-I} \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )\right ) x^{2}-24 \,\mathrm {I} x \mathit {polylog}\left (2, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right ) {\mathrm e}^{\mathrm {I} x}-3 \,\mathrm {I} x \,{\mathrm e}^{\mathrm {I} x}+24 \mathit {polylog}\left (3, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right ) {\mathrm e}^{\mathrm {I} x}+6 \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right ) {\mathrm e}^{\mathrm {I} x}+24 x \mathit {polylog}\left (2, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+24 \,\mathrm {I} \mathit {polylog}\left (3, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+6 \,\mathrm {I} \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )+3 x}{3 \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )}} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}\left (y \mu \left (x \right )\right )\right )d x =\int -\frac {4 \mu \left (x \right ) x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )}d x +c_{1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \mu \left (x \right )=\int -\frac {4 \mu \left (x \right ) x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )}d x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {\int -\frac {4 \mu \left (x \right ) x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )}d x +c_{1}}{\mu \left (x \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (x \right )={\mathrm e}^{\frac {-4 \,\mathrm {I} x^{3} {\mathrm e}^{\mathrm {I} x}+12 x^{2} \ln \left (\mathrm {-I} \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )\right ) {\mathrm e}^{\mathrm {I} x}+12 \,\mathrm {I} \ln \left (\mathrm {-I} \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )\right ) x^{2}-24 \,\mathrm {I} x \mathit {polylog}\left (2, \mathrm {I} {\mathrm e}^{\mathrm {I} x}\right ) {\mathrm e}^{\mathrm {I} x}-3 \,\mathrm {I} x {\mathrm e}^{\mathrm {I} x}+24 \mathit {polylog}\left (3, \mathrm {I} {\mathrm e}^{\mathrm {I} x}\right ) {\mathrm e}^{\mathrm {I} x}+6 \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right ) {\mathrm e}^{\mathrm {I} x}+24 x \mathit {polylog}\left (2, \mathrm {I} {\mathrm e}^{\mathrm {I} x}\right )+24 \,\mathrm {I} \mathit {polylog}\left (3, \mathrm {I} {\mathrm e}^{\mathrm {I} x}\right )+6 \,\mathrm {I} \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )+3 x}{3 \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )}} \\ {} & {} & y=\frac {\int -\frac {4 \,{\mathrm e}^{\frac {-4 \,\mathrm {I} x^{3} {\mathrm e}^{\mathrm {I} x}+12 x^{2} \ln \left (\mathrm {-I} \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )\right ) {\mathrm e}^{\mathrm {I} x}+12 \,\mathrm {I} \ln \left (\mathrm {-I} \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )\right ) x^{2}-24 \,\mathrm {I} x \mathit {polylog}\left (2, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right ) {\mathrm e}^{\mathrm {I} x}-3 \,\mathrm {I} x \,{\mathrm e}^{\mathrm {I} x}+24 \mathit {polylog}\left (3, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right ) {\mathrm e}^{\mathrm {I} x}+6 \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right ) {\mathrm e}^{\mathrm {I} x}+24 x \mathit {polylog}\left (2, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+24 \,\mathrm {I} \mathit {polylog}\left (3, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+6 \,\mathrm {I} \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )+3 x}{3 \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )}} x \,{\mathrm e}^{x}}{3 \left (1+\sin \left (x \right )\right )}d x +c_{1}}{{\mathrm e}^{\frac {-4 \,\mathrm {I} x^{3} {\mathrm e}^{\mathrm {I} x}+12 x^{2} \ln \left (\mathrm {-I} \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )\right ) {\mathrm e}^{\mathrm {I} x}+12 \,\mathrm {I} \ln \left (\mathrm {-I} \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )\right ) x^{2}-24 \,\mathrm {I} x \mathit {polylog}\left (2, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right ) {\mathrm e}^{\mathrm {I} x}-3 \,\mathrm {I} x \,{\mathrm e}^{\mathrm {I} x}+24 \mathit {polylog}\left (3, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right ) {\mathrm e}^{\mathrm {I} x}+6 \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right ) {\mathrm e}^{\mathrm {I} x}+24 x \mathit {polylog}\left (2, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+24 \,\mathrm {I} \mathit {polylog}\left (3, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+6 \,\mathrm {I} \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )+3 x}{3 \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )}}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y=-\frac {\left (4 \left (\int \frac {x \,{\mathrm e}^{\frac {4 \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right ) x^{2} \ln \left (1-\mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+8 x \left (1-\mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right ) \mathit {polylog}\left (2, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+8 \mathit {polylog}\left (3, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right ) \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )+2 \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right ) \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )+\left (\left (-\frac {4 \,\mathrm {I} x^{2}}{3}+1-\mathrm {I}\right ) {\mathrm e}^{\mathrm {I} x}+1+\mathrm {I}\right ) x}{{\mathrm e}^{\mathrm {I} x}+\mathrm {I}}}}{1+\sin \left (x \right )}d x \right )-3 c_{1} \right ) {\mathrm e}^{\frac {-12 \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right ) x^{2} \ln \left (1-\mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+\left (24 \,\mathrm {I} x \,{\mathrm e}^{\mathrm {I} x}-24 x \right ) \mathit {polylog}\left (2, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+\left (-24 \,\mathrm {I}-24 \,{\mathrm e}^{\mathrm {I} x}\right ) \mathit {polylog}\left (3, \mathrm {I} \,{\mathrm e}^{\mathrm {I} x}\right )+\left (-6 \,\mathrm {I}-6 \,{\mathrm e}^{\mathrm {I} x}\right ) \ln \left ({\mathrm e}^{\mathrm {I} x}+\mathrm {I}\right )+4 \,\mathrm {I} \left (x^{2}+\frac {3}{4}\right ) x \,{\mathrm e}^{\mathrm {I} x}-3 x}{3 \,{\mathrm e}^{\mathrm {I} x}+3 \,\mathrm {I}}}}{3} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 

Solution by Maple

Time used: 0.031 (sec). Leaf size: 395

dsolve((3*y(x)*cos(x)+4*x*exp(x)+2*x^3*y(x))+(3*sin(x)+3)*diff(y(x),x)=0,y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {{\mathrm e}^{\frac {\left (-24 x +24 i x \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (-24 i-24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )+4 i x \left (x^{2}+\frac {3}{4}\right ) {\mathrm e}^{i x}-3 x}{3 \,{\mathrm e}^{i x}+3 i}} \left (4 \left (\int \frac {\left (-2 i {\mathrm e}^{\frac {24 x \left ({\mathrm e}^{i x}+i\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+4 \,{\mathrm e}^{i x} x^{3}+3 i x \,{\mathrm e}^{i x}+24 i \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right ) {\mathrm e}^{i x}-3 x -24 \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )}{3 i {\mathrm e}^{i x}-3}}+{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 x \left (\left (6 i {\mathrm e}^{i x}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (i x^{2}-\frac {3}{4}+\frac {3}{4} i\right ) {\mathrm e}^{i x}-\frac {3}{4}-\frac {3 i}{4}\right )}{3 \,{\mathrm e}^{i x}+3 i}}-{\mathrm e}^{\frac {\left (24 i+24 \,{\mathrm e}^{i x}\right ) \operatorname {polylog}\left (3, i {\mathrm e}^{i x}\right )-4 x \left (\left (6 i {\mathrm e}^{i x}-6\right ) \operatorname {polylog}\left (2, i {\mathrm e}^{i x}\right )+\left (i x^{2}-\frac {3}{4}-\frac {3}{4} i\right ) {\mathrm e}^{i x}+\frac {3}{4}-\frac {3 i}{4}\right )}{3 \,{\mathrm e}^{i x}+3 i}}\right ) \left (1-i {\mathrm e}^{i x}\right )^{4 x^{2}} x}{\sin \left (x \right )+1}d x \right )+3 c_{1} \right ) \left (1-i {\mathrm e}^{i x}\right )^{-4 x^{2}}}{3 \left ({\mathrm e}^{i x}+i\right )^{2}} \]

Solution by Mathematica

Time used: 27.47 (sec). Leaf size: 193

DSolve[(3*y[x]*Cos[x]+4*x*Exp[x]+2*x^3*y[x])+(3*Sin[x]+3)*y'[x]==0,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {\left (1+i e^{-i x}\right )^{-4 x^2} \exp \left (-8 i x \operatorname {PolyLog}\left (2,-i e^{-i x}\right )-8 \operatorname {PolyLog}\left (3,-i e^{-i x}\right )+\frac {2}{3} x^3 \left (\cot \left (\frac {1}{4} (2 x+\pi )\right )-i\right )\right ) \left (\int _1^x-\frac {4}{3} \exp \left (-\frac {2}{3} \cot \left (\frac {1}{4} (2 K[1]+\pi )\right ) K[1]^3+\frac {2}{3} i K[1]^3+8 i \operatorname {PolyLog}\left (2,-i e^{-i K[1]}\right ) K[1]+K[1]+8 \operatorname {PolyLog}\left (3,-i e^{-i K[1]}\right )\right ) K[1] (i \cos (K[1])+\sin (K[1])+1)^{4 K[1]^2}dK[1]+c_1\right )}{\sin (x)+1} \]