$\int {e}^{\mathrm{cos}x}dx\phantom{\rule{0ex}{0ex}}={\int}_{n=0}^{\mathrm{\infty}}\frac{{\mathrm{cos}}^{2n}x}{(2n)!}dx+\int \sum _{n=0}^{\mathrm{\infty}}\frac{{\mathrm{cos}}^{2n+1}x}{(2n+1)!}dx\phantom{\rule{0ex}{0ex}}=\int (1+\sum _{n=1}^{\mathrm{\infty}}\frac{{\mathrm{cos}}^{2n}x}{(2n)!})dx+\int \sum _{n=0}^{\int}\frac{{\mathrm{cos}}^{2n+1}x}{(2n+1)!}dx\phantom{\rule{0ex}{0ex}}\text{For n is any natural number,}\phantom{\rule{0ex}{0ex}}\int {\mathrm{cos}}^{2n}xdx=\frac{(2n)!x}{{4}^{n}(n!{)}^{2}}+\sum _{k=1}^{n}\frac{(2n)!((k-1)!{)}^{2}\mathrm{sin}x{\mathrm{cos}}^{2k-1}x}{{4}^{n-k+1}(n!{)}^{2}(2k-1)!}+C\phantom{\rule{0ex}{0ex}}\text{This result can be done by successive integration by parts.}\phantom{\rule{0ex}{0ex}}\text{For n is any non-negative integer,}\phantom{\rule{0ex}{0ex}}\int {\mathrm{cos}}^{2n+1}xdx\phantom{\rule{0ex}{0ex}}=\int {\mathrm{cos}}^{2n}xd(\mathrm{sin}x)\phantom{\rule{0ex}{0ex}}=\int (1-{\mathrm{sin}}^{2}x{)}^{n}d(\mathrm{sin}x)\phantom{\rule{0ex}{0ex}}=\int \sum _{k=0}^{\mathrm{\infty}}{C}_{k}^{n}(-1{)}^{k}{\mathrm{sin}}^{2k}xd(\mathrm{sin}x)\phantom{\rule{0ex}{0ex}}=\sum _{k=0}^{n}\frac{(-1{)}^{k}n!{\mathrm{sin}}^{2k+1}x}{k!(n-k)!(2k+1)}+C\phantom{\rule{0ex}{0ex}}\therefore \int (1+\sum _{n=1}^{\mathrm{\infty}}\frac{{\mathrm{cos}}^{2n}x}{(2n)!})dx+\int \sum _{n=0}^{\mathrm{\infty}}\frac{{\mathrm{cos}}^{2n+1}x}{(2n+1)!}dx\phantom{\rule{0ex}{0ex}}=x+\sum _{n=1}^{\mathrm{\infty}}\frac{x}{{4}^{n}(n!{)}^{2}}+\sum _{n=1}^{\mathrm{\infty}}\sum _{k=1}^{n}\frac{(k-1)!{)}^{2}\mathrm{sin}x{\mathrm{cos}}^{2k-1}x}{{4}^{n-k+1}(n!{)}^{2}(2k-1)!}+\sum _{k=0}^{n}\frac{(-1{)}^{k}n!{\mathrm{sin}}^{2k+1}x}{(2n+1)!k!(n-k)!(2k+1)}+C$