2.4.13 problem 13

Maple step by step solution
Maple trace
Maple dsolve solution
Mathematica DSolve solution

Internal problem ID [8578]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 13
Date solved : Thursday, December 12, 2024 at 09:31:22 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solve

\begin{align*} x^{2} y^{\prime \prime }+\left (\cos \left (x \right )-1\right ) y^{\prime }+{\mathrm e}^{x} y&=0 \end{align*}

Using series expansion around \(x=0\)

The type of the expansion point is first determined. This is done on the homogeneous part of the ODE.

\[ x^{2} y^{\prime \prime }+\left (\cos \left (x \right )-1\right ) y^{\prime }+{\mathrm e}^{x} y = 0 \]

The following is summary of singularities for the above ode. Writing the ode as

\begin{align*} y^{\prime \prime }+p(x) y^{\prime } + q(x) y &=0 \end{align*}

Where

\begin{align*} p(x) &= \frac {\cos \left (x \right )-1}{x^{2}}\\ q(x) &= \frac {{\mathrm e}^{x}}{x^{2}}\\ \end{align*}
Table 2.67: Table \(p(x),q(x)\) singularites.
\(p(x)=\frac {\cos \left (x \right )-1}{x^{2}}\)
singularity type
\(x = 0\) \(\text {``regular''}\)
\(q(x)=\frac {{\mathrm e}^{x}}{x^{2}}\)
singularity type
\(x = 0\) \(\text {``regular''}\)
\(x = \infty \) \(\text {``regular''}\)

Combining everything together gives the following summary of singularities for the ode as

Regular singular points : \([0, \infty ]\)

Irregular singular points : \([\infty ]\)

Since \(x = 0\) is regular singular point, then Frobenius power series is used. The ode is normalized to be

\[ x^{2} y^{\prime \prime }+\left (\cos \left (x \right )-1\right ) y^{\prime }+{\mathrm e}^{x} y = 0 \]

Let the solution be represented as Frobenius power series of the form

\[ y = \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r} \]

Then

\begin{align*} y^{\prime } &= \moverset {\infty }{\munderset {n =0}{\sum }}\left (n +r \right ) a_{n} x^{n +r -1} \\ y^{\prime \prime } &= \moverset {\infty }{\munderset {n =0}{\sum }}\left (n +r \right ) \left (n +r -1\right ) a_{n} x^{n +r -2} \\ \end{align*}

Substituting the above back into the ode gives

\begin{equation} \tag{1} x^{2} \left (\moverset {\infty }{\munderset {n =0}{\sum }}\left (n +r \right ) \left (n +r -1\right ) a_{n} x^{n +r -2}\right )+\left (\cos \left (x \right )-1\right ) \left (\moverset {\infty }{\munderset {n =0}{\sum }}\left (n +r \right ) a_{n} x^{n +r -1}\right )+{\mathrm e}^{x} \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r}\right ) = 0 \end{equation}

Expanding \(\cos \left (x \right )-1\) as Taylor series around \(x=0\) and keeping only the first \(6\) terms gives

\begin{align*} \cos \left (x \right )-1 &= -\frac {1}{2} x^{2}+\frac {1}{24} x^{4}-\frac {1}{720} x^{6} + \dots \\ &= -\frac {1}{2} x^{2}+\frac {1}{24} x^{4}-\frac {1}{720} x^{6} \end{align*}

Expanding \({\mathrm e}^{x}\) as Taylor series around \(x=0\) and keeping only the first \(6\) terms gives

\begin{align*} {\mathrm e}^{x} &= 1+x +\frac {1}{2} x^{2}+\frac {1}{6} x^{3}+\frac {1}{24} x^{4}+\frac {1}{120} x^{5}+\frac {1}{720} x^{6} + \dots \\ &= 1+x +\frac {1}{2} x^{2}+\frac {1}{6} x^{3}+\frac {1}{24} x^{4}+\frac {1}{120} x^{5}+\frac {1}{720} x^{6} \end{align*}

Which simplifies to

\begin{equation} \tag{2A} \left (\moverset {\infty }{\munderset {n =0}{\sum }}x^{n +r} a_{n} \left (n +r \right ) \left (n +r -1\right )\right )+\moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {x^{n +r +5} a_{n} \left (n +r \right )}{720}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +3} a_{n} \left (n +r \right )}{24}\right )+\moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {x^{1+n +r} a_{n} \left (n +r \right )}{2}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}x^{1+n +r} a_{n}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +2} a_{n}}{2}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +3} a_{n}}{6}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +4} a_{n}}{24}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +5} a_{n}}{120}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +6} a_{n}}{720}\right ) = 0 \end{equation}

The next step is to make all powers of \(x\) be \(n +r\) in each summation term. Going over each summation term above with power of \(x\) in it which is not already \(x^{n +r}\) and adjusting the power and the corresponding index gives

\begin{align*} \moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {x^{n +r +5} a_{n} \left (n +r \right )}{720}\right ) &= \moverset {\infty }{\munderset {n =5}{\sum }}\left (-\frac {a_{n -5} \left (n -5+r \right ) x^{n +r}}{720}\right ) \\ \moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +3} a_{n} \left (n +r \right )}{24} &= \moverset {\infty }{\munderset {n =3}{\sum }}\frac {a_{n -3} \left (n -3+r \right ) x^{n +r}}{24} \\ \moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {x^{1+n +r} a_{n} \left (n +r \right )}{2}\right ) &= \moverset {\infty }{\munderset {n =1}{\sum }}\left (-\frac {a_{n -1} \left (n +r -1\right ) x^{n +r}}{2}\right ) \\ \moverset {\infty }{\munderset {n =0}{\sum }}x^{1+n +r} a_{n} &= \moverset {\infty }{\munderset {n =1}{\sum }}a_{n -1} x^{n +r} \\ \moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +2} a_{n}}{2} &= \moverset {\infty }{\munderset {n =2}{\sum }}\frac {a_{n -2} x^{n +r}}{2} \\ \moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +3} a_{n}}{6} &= \moverset {\infty }{\munderset {n =3}{\sum }}\frac {a_{n -3} x^{n +r}}{6} \\ \moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +4} a_{n}}{24} &= \moverset {\infty }{\munderset {n =4}{\sum }}\frac {a_{n -4} x^{n +r}}{24} \\ \moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +5} a_{n}}{120} &= \moverset {\infty }{\munderset {n =5}{\sum }}\frac {a_{n -5} x^{n +r}}{120} \\ \moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +r +6} a_{n}}{720} &= \moverset {\infty }{\munderset {n =6}{\sum }}\frac {a_{n -6} x^{n +r}}{720} \\ \end{align*}

Substituting all the above in Eq (2A) gives the following equation where now all powers of \(x\) are the same and equal to \(n +r\).

\begin{equation} \tag{2B} \left (\moverset {\infty }{\munderset {n =0}{\sum }}x^{n +r} a_{n} \left (n +r \right ) \left (n +r -1\right )\right )+\moverset {\infty }{\munderset {n =5}{\sum }}\left (-\frac {a_{n -5} \left (n -5+r \right ) x^{n +r}}{720}\right )+\left (\moverset {\infty }{\munderset {n =3}{\sum }}\frac {a_{n -3} \left (n -3+r \right ) x^{n +r}}{24}\right )+\moverset {\infty }{\munderset {n =1}{\sum }}\left (-\frac {a_{n -1} \left (n +r -1\right ) x^{n +r}}{2}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +r}\right )+\left (\moverset {\infty }{\munderset {n =1}{\sum }}a_{n -1} x^{n +r}\right )+\left (\moverset {\infty }{\munderset {n =2}{\sum }}\frac {a_{n -2} x^{n +r}}{2}\right )+\left (\moverset {\infty }{\munderset {n =3}{\sum }}\frac {a_{n -3} x^{n +r}}{6}\right )+\left (\moverset {\infty }{\munderset {n =4}{\sum }}\frac {a_{n -4} x^{n +r}}{24}\right )+\left (\moverset {\infty }{\munderset {n =5}{\sum }}\frac {a_{n -5} x^{n +r}}{120}\right )+\left (\moverset {\infty }{\munderset {n =6}{\sum }}\frac {a_{n -6} x^{n +r}}{720}\right ) = 0 \end{equation}

The indicial equation is obtained from \(n = 0\). From Eq (2B) this gives

\[ x^{n +r} a_{n} \left (n +r \right ) \left (n +r -1\right )+a_{n} x^{n +r} = 0 \]

When \(n = 0\) the above becomes

\[ x^{r} a_{0} r \left (-1+r \right )+a_{0} x^{r} = 0 \]

Or

\[ \left (x^{r} r \left (-1+r \right )+x^{r}\right ) a_{0} = 0 \]

Since \(a_{0}\neq 0\) then the above simplifies to

\[ \left (r^{2}-r +1\right ) x^{r} = 0 \]

Since the above is true for all \(x\) then the indicial equation becomes

\[ r^{2}-r +1 = 0 \]

Solving for \(r\) gives the roots of the indicial equation as

\begin{align*} r_1 &= \frac {1}{2}+\frac {i \sqrt {3}}{2}\\ r_2 &= \frac {1}{2}-\frac {i \sqrt {3}}{2} \end{align*}

Since \(a_{0}\neq 0\) then the indicial equation becomes

\[ \left (r^{2}-r +1\right ) x^{r} = 0 \]

Solving for \(r\) gives the roots of the indicial equation as \(\left [\frac {1}{2}+\frac {i \sqrt {3}}{2}, \frac {1}{2}-\frac {i \sqrt {3}}{2}\right ]\).

Since the roots are complex conjugates, then two linearly independent solutions can be constructed using

\begin{align*} y_{1}\left (x \right ) &= x^{r_{1}} \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n}\right )\\ y_{2}\left (x \right ) &= x^{r_{2}} \left (\moverset {\infty }{\munderset {n =0}{\sum }}b_{n} x^{n}\right ) \end{align*}

Or

\begin{align*} y_{1}\left (x \right ) &= \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n +\frac {1}{2}+\frac {i \sqrt {3}}{2}}\\ y_{2}\left (x \right ) &= \moverset {\infty }{\munderset {n =0}{\sum }}b_{n} x^{n +\frac {1}{2}-\frac {i \sqrt {3}}{2}} \end{align*}

\(y_{1}\left (x \right )\) is found first. Eq (2B) derived above is now used to find all \(a_{n}\) coefficients. The case \(n = 0\) is skipped since it was used to find the roots of the indicial equation. \(a_{0}\) is arbitrary and taken as \(a_{0} = 1\). Substituting \(n = 1\) in Eq. (2B) gives

\[ a_{1} = \frac {r -2}{2 r^{2}+2 r +2} \]

Substituting \(n = 2\) in Eq. (2B) gives

\[ a_{2} = -\frac {r \left (r +5\right )}{4 \left (r^{2}+r +1\right ) \left (r^{2}+3 r +3\right )} \]

Substituting \(n = 3\) in Eq. (2B) gives

\[ a_{3} = \frac {-r^{5}-8 r^{4}-32 r^{3}-55 r^{2}-9 r +24}{24 \left (r^{2}+r +1\right ) \left (r^{2}+3 r +3\right ) \left (r^{2}+5 r +7\right )} \]

Substituting \(n = 4\) in Eq. (2B) gives

\[ a_{4} = \frac {-4 r^{6}-38 r^{5}-141 r^{4}-196 r^{3}+85 r^{2}+408 r +192}{48 \left (r^{2}+r +1\right ) \left (r^{2}+3 r +3\right ) \left (r^{2}+5 r +7\right ) \left (r^{2}+7 r +13\right )} \]

Substituting \(n = 5\) in Eq. (2B) gives

\[ a_{5} = \frac {2 r^{9}+20 r^{8}-17 r^{7}-757 r^{6}-1964 r^{5}+7667 r^{4}+50216 r^{3}+98979 r^{2}+73140 r +9504}{1440 \left (r^{2}+r +1\right ) \left (r^{2}+3 r +3\right ) \left (r^{2}+5 r +7\right ) \left (r^{2}+7 r +13\right ) \left (r^{2}+9 r +21\right )} \]

For \(6\le n\) the recursive equation is

\begin{equation} \tag{3} a_{n} \left (n +r \right ) \left (n +r -1\right )-\frac {a_{n -5} \left (n -5+r \right )}{720}+\frac {a_{n -3} \left (n -3+r \right )}{24}-\frac {a_{n -1} \left (n +r -1\right )}{2}+a_{n}+a_{n -1}+\frac {a_{n -2}}{2}+\frac {a_{n -3}}{6}+\frac {a_{n -4}}{24}+\frac {a_{n -5}}{120}+\frac {a_{n -6}}{720} = 0 \end{equation}

Solving for \(a_{n}\) from recursive equation (4) gives

\[ a_{n} = \frac {n a_{n -5}-30 n a_{n -3}+360 n a_{n -1}+r a_{n -5}-30 r a_{n -3}+360 r a_{n -1}-a_{n -6}-11 a_{n -5}-30 a_{n -4}-30 a_{n -3}-360 a_{n -2}-1080 a_{n -1}}{720 n^{2}+1440 n r +720 r^{2}-720 n -720 r +720}\tag {4} \]

Which for the root \(r = \frac {1}{2}+\frac {i \sqrt {3}}{2}\) becomes

\[ a_{n} = \frac {i \left (a_{n -5}-30 a_{n -3}+360 a_{n -1}\right ) \sqrt {3}+2 \left (a_{n -5}-30 a_{n -3}+360 a_{n -1}\right ) n -2 a_{n -6}-21 a_{n -5}-60 a_{n -4}-90 a_{n -3}-720 a_{n -2}-1800 a_{n -1}}{1440 n \left (i \sqrt {3}+n \right )}\tag {5} \]

At this point, it is a good idea to keep track of \(a_{n}\) in a table both before substituting \(r = \frac {1}{2}+\frac {i \sqrt {3}}{2}\) and after as more terms are found using the above recursive equation.

\(n\) \(a_{n ,r}\) \(a_{n}\)
\(a_{0}\) \(1\) \(1\)
\(a_{1}\) \(\frac {r -2}{2 r^{2}+2 r +2}\) \(\frac {i \sqrt {3}}{4}\)
\(a_{2}\) \(-\frac {r \left (r +5\right )}{4 \left (r^{2}+r +1\right ) \left (r^{2}+3 r +3\right )}\) \(\frac {-i \sqrt {3}-11}{32 i \sqrt {3}+64}\)
\(a_{3}\) \(\frac {-r^{5}-8 r^{4}-32 r^{3}-55 r^{2}-9 r +24}{24 \left (r^{2}+r +1\right ) \left (r^{2}+3 r +3\right ) \left (r^{2}+5 r +7\right )}\) \(\frac {\frac {55 \sqrt {3}}{288}+\frac {55 i}{96}}{\left (i-\sqrt {3}\right ) \left (i \sqrt {3}+2\right ) \left (i \sqrt {3}+3\right )}\)
\(a_{4}\) \(\frac {-4 r^{6}-38 r^{5}-141 r^{4}-196 r^{3}+85 r^{2}+408 r +192}{48 \left (r^{2}+r +1\right ) \left (r^{2}+3 r +3\right ) \left (r^{2}+5 r +7\right ) \left (r^{2}+7 r +13\right )}\) \(\frac {112 i \sqrt {3}+199}{384 \left (-\sqrt {3}+2 i\right ) \left (-i+\sqrt {3}\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+4\right )}\)
\(a_{5}\) \(\frac {2 r^{9}+20 r^{8}-17 r^{7}-757 r^{6}-1964 r^{5}+7667 r^{4}+50216 r^{3}+98979 r^{2}+73140 r +9504}{1440 \left (r^{2}+r +1\right ) \left (r^{2}+3 r +3\right ) \left (r^{2}+5 r +7\right ) \left (r^{2}+7 r +13\right ) \left (r^{2}+9 r +21\right )}\) \(\frac {\frac {18491 \sqrt {3}}{38400}+\frac {4387 i}{12800}}{\left (-i+\sqrt {3}\right ) \left (i \sqrt {3}+2\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+4\right ) \left (i \sqrt {3}+5\right )}\)

Using the above table, then the solution \(y_{1}\left (x \right )\) is

\begin{align*} y_{1}\left (x \right )&= x^{\frac {1}{2}+\frac {i \sqrt {3}}{2}} \left (a_{0}+a_{1} x +a_{2} x^{2}+a_{3} x^{3}+a_{4} x^{4}+a_{5} x^{5}+a_{6} x^{6}\dots \right ) \\ &= x^{\frac {1}{2}+\frac {i \sqrt {3}}{2}} \left (1+\frac {i \sqrt {3}\, x}{4}+\frac {\left (-i \sqrt {3}-11\right ) x^{2}}{32 i \sqrt {3}+64}+\frac {55 \left (\sqrt {3}+3 i\right ) x^{3}}{288 \left (i-\sqrt {3}\right ) \left (i \sqrt {3}+2\right ) \left (i \sqrt {3}+3\right )}+\frac {\left (112 i \sqrt {3}+199\right ) x^{4}}{384 \left (-\sqrt {3}+2 i\right ) \left (-i+\sqrt {3}\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+4\right )}+\frac {41 \left (451 \sqrt {3}+321 i\right ) x^{5}}{38400 \left (-i+\sqrt {3}\right ) \left (i \sqrt {3}+2\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+4\right ) \left (i \sqrt {3}+5\right )}+O\left (x^{6}\right )\right ) \\ \end{align*}

The second solution \(y_{2}\left (x \right )\) is found by taking the complex conjugate of \(y_{1}\left (x \right )\) which gives

\[ y_{2}\left (x \right )= x^{\frac {1}{2}-\frac {i \sqrt {3}}{2}} \left (1-\frac {i \sqrt {3}\, x}{4}+\frac {\left (i \sqrt {3}-11\right ) x^{2}}{-32 i \sqrt {3}+64}+\frac {55 \left (\sqrt {3}-3 i\right ) x^{3}}{288 \left (-i-\sqrt {3}\right ) \left (-i \sqrt {3}+2\right ) \left (-i \sqrt {3}+3\right )}+\frac {\left (-112 i \sqrt {3}+199\right ) x^{4}}{384 \left (-\sqrt {3}-2 i\right ) \left (\sqrt {3}+i\right ) \left (-i \sqrt {3}+3\right ) \left (-i \sqrt {3}+4\right )}+\frac {41 \left (451 \sqrt {3}-321 i\right ) x^{5}}{38400 \left (\sqrt {3}+i\right ) \left (-i \sqrt {3}+2\right ) \left (-i \sqrt {3}+3\right ) \left (-i \sqrt {3}+4\right ) \left (-i \sqrt {3}+5\right )}+O\left (x^{6}\right )\right ) \]

Therefore the homogeneous solution is

\begin{align*} y_h(x) &= c_1 y_{1}\left (x \right )+c_2 y_{2}\left (x \right ) \\ &= c_1 \,x^{\frac {1}{2}+\frac {i \sqrt {3}}{2}} \left (1+\frac {i \sqrt {3}\, x}{4}+\frac {\left (-i \sqrt {3}-11\right ) x^{2}}{32 i \sqrt {3}+64}+\frac {55 \left (\sqrt {3}+3 i\right ) x^{3}}{288 \left (i-\sqrt {3}\right ) \left (i \sqrt {3}+2\right ) \left (i \sqrt {3}+3\right )}+\frac {\left (112 i \sqrt {3}+199\right ) x^{4}}{384 \left (-\sqrt {3}+2 i\right ) \left (-i+\sqrt {3}\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+4\right )}+\frac {41 \left (451 \sqrt {3}+321 i\right ) x^{5}}{38400 \left (-i+\sqrt {3}\right ) \left (i \sqrt {3}+2\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+4\right ) \left (i \sqrt {3}+5\right )}+O\left (x^{6}\right )\right ) + c_2 \,x^{\frac {1}{2}-\frac {i \sqrt {3}}{2}} \left (1-\frac {i \sqrt {3}\, x}{4}+\frac {\left (i \sqrt {3}-11\right ) x^{2}}{-32 i \sqrt {3}+64}+\frac {55 \left (\sqrt {3}-3 i\right ) x^{3}}{288 \left (-i-\sqrt {3}\right ) \left (-i \sqrt {3}+2\right ) \left (-i \sqrt {3}+3\right )}+\frac {\left (-112 i \sqrt {3}+199\right ) x^{4}}{384 \left (-\sqrt {3}-2 i\right ) \left (\sqrt {3}+i\right ) \left (-i \sqrt {3}+3\right ) \left (-i \sqrt {3}+4\right )}+\frac {41 \left (451 \sqrt {3}-321 i\right ) x^{5}}{38400 \left (\sqrt {3}+i\right ) \left (-i \sqrt {3}+2\right ) \left (-i \sqrt {3}+3\right ) \left (-i \sqrt {3}+4\right ) \left (-i \sqrt {3}+5\right )}+O\left (x^{6}\right )\right ) \\ \end{align*}

Hence the final solution is

\begin{align*} y &= y_h \\ &= c_1 \,x^{\frac {1}{2}+\frac {i \sqrt {3}}{2}} \left (1+\frac {i \sqrt {3}\, x}{4}+\frac {\left (-i \sqrt {3}-11\right ) x^{2}}{32 i \sqrt {3}+64}+\frac {55 \left (\sqrt {3}+3 i\right ) x^{3}}{288 \left (i-\sqrt {3}\right ) \left (i \sqrt {3}+2\right ) \left (i \sqrt {3}+3\right )}+\frac {\left (112 i \sqrt {3}+199\right ) x^{4}}{384 \left (-\sqrt {3}+2 i\right ) \left (-i+\sqrt {3}\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+4\right )}+\frac {41 \left (451 \sqrt {3}+321 i\right ) x^{5}}{38400 \left (-i+\sqrt {3}\right ) \left (i \sqrt {3}+2\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+4\right ) \left (i \sqrt {3}+5\right )}+O\left (x^{6}\right )\right )+c_2 \,x^{\frac {1}{2}-\frac {i \sqrt {3}}{2}} \left (1-\frac {i \sqrt {3}\, x}{4}+\frac {\left (i \sqrt {3}-11\right ) x^{2}}{-32 i \sqrt {3}+64}+\frac {55 \left (\sqrt {3}-3 i\right ) x^{3}}{288 \left (-i-\sqrt {3}\right ) \left (-i \sqrt {3}+2\right ) \left (-i \sqrt {3}+3\right )}+\frac {\left (-112 i \sqrt {3}+199\right ) x^{4}}{384 \left (-\sqrt {3}-2 i\right ) \left (\sqrt {3}+i\right ) \left (-i \sqrt {3}+3\right ) \left (-i \sqrt {3}+4\right )}+\frac {41 \left (451 \sqrt {3}-321 i\right ) x^{5}}{38400 \left (\sqrt {3}+i\right ) \left (-i \sqrt {3}+2\right ) \left (-i \sqrt {3}+3\right ) \left (-i \sqrt {3}+4\right ) \left (-i \sqrt {3}+5\right )}+O\left (x^{6}\right )\right ) \\ \end{align*}
Maple step by step solution

Maple trace
`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a symmetry of the form [xi=0, eta=F(x)] 
checking if the LODE is missing y 
-> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
-> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x), dx)) * 2F1([a1, a2], [b1], f) 
-> Trying changes of variables to rationalize or make the ODE simpler 
   trying a symmetry of the form [xi=0, eta=F(x)] 
   checking if the LODE is missing y 
   -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
   -> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x), dx)) * 2F1([a1, a2], [b1], f) 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      trying 2nd order exact linear 
      trying symmetries linear in x and y(x) 
      trying to convert to a linear ODE with constant coefficients 
      -> trying with_periodic_functions in the coefficients 
         --- Trying Lie symmetry methods, 2nd order --- 
         `, `-> Computing symmetries using: way = 5 
   trying a symmetry of the form [xi=0, eta=F(x)] 
   checking if the LODE is missing y 
   -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
   -> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x), dx)) * 2F1([a1, a2], [b1], f) 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      trying 2nd order exact linear 
      trying symmetries linear in x and y(x) 
      trying to convert to a linear ODE with constant coefficients 
      -> trying with_periodic_functions in the coefficients 
         --- Trying Lie symmetry methods, 2nd order --- 
         `, `-> Computing symmetries using: way = 5`[0, u]
 
Maple dsolve solution

Solving time : 0.257 (sec)
Leaf size : 300

dsolve(x^2*diff(diff(y(x),x),x)+(cos(x)-1)*diff(y(x),x)+exp(x)*y(x) = 0,y(x), 
       series,x=0)
 
\[ y = \sqrt {x}\, \left (c_{2} x^{\frac {i \sqrt {3}}{2}} \left (1+\frac {1}{4} i \sqrt {3} x +\frac {-i \sqrt {3}-11}{32 i \sqrt {3}+64} x^{2}+\frac {\frac {55 \sqrt {3}}{288}+\frac {55 i}{96}}{\left (i-\sqrt {3}\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+2\right )} x^{3}+\frac {1}{384} \frac {112 i \sqrt {3}+199}{\left (-\sqrt {3}+2 i\right ) \left (i \sqrt {3}+4\right ) \left (i \sqrt {3}+3\right ) \left (-i+\sqrt {3}\right )} x^{4}+\frac {\frac {18491 \sqrt {3}}{38400}+\frac {4387 i}{12800}}{\left (i \sqrt {3}+5\right ) \left (i \sqrt {3}+4\right ) \left (i \sqrt {3}+3\right ) \left (i \sqrt {3}+2\right ) \left (-i+\sqrt {3}\right )} x^{5}+\operatorname {O}\left (x^{6}\right )\right )+c_{1} x^{-\frac {i \sqrt {3}}{2}} \left (1-\frac {1}{4} i \sqrt {3} x +\frac {-\sqrt {3}-11 i}{64 i+32 \sqrt {3}} x^{2}+\frac {55 \sqrt {3}-165 i}{3456 i-2304 \sqrt {3}} x^{3}+\frac {199 i+112 \sqrt {3}}{-27648 i+7680 \sqrt {3}} x^{4}+\frac {\frac {18491 \sqrt {3}}{38400}-\frac {4387 i}{12800}}{\left (2 i+\sqrt {3}\right ) \left (\sqrt {3}+5 i\right ) \left (\sqrt {3}+4 i\right ) \left (\sqrt {3}+3 i\right ) \left (\sqrt {3}+i\right )} x^{5}+\operatorname {O}\left (x^{6}\right )\right )\right ) \]
Mathematica DSolve solution

Solving time : 0.01 (sec)
Leaf size : 2502

AsymptoticDSolveValue[{x^2*D[y[x],{x,2}] + (Cos[x]-1)*D[y[x],x] + Exp[x]*y[x] ==0,{}}, 
       y[x],{x,0,5}]
 

Too large to display