# How to integrate exponent of sine?

I am trying to integrate Abs|E^ $$\sin \theta$$| (the absolute value of Euler's constant to the power of sin(theta), and tried the code Integrate[Abs[E^Sin[x]], x] but it returned as \[Integral]E^Re[Sin[x]] \[DifferentialD]x

Could someone please show me how to correctly integrate the function? Thanks, and sorry in advance for the corrections you would have to make to this post!

• I am sure the antiderivative under consideration has no closed-form expression. Think of the function NIntegrate[Abs[E^Sin[t]], {t, 0, x}]. Commented May 27, 2019 at 3:49
• Or better, to make @user64494's point more clear: Plot[NIntegrate[RealAbs[E^Sin[x]], {x, -10, t}],{t, -10, 10}] Commented May 27, 2019 at 3:52
• thanks for your clarification, @b3m2a1 Commented May 27, 2019 at 9:38
• thank you for your advice, @user64494 ! Commented May 27, 2019 at 9:39

## 1 Answer

Check this numerical treatment:

g[t_] := Abs[E^Sin[t]]
nsol = Table[NIntegrate[g[t], {t, 0, x}], {x, -10, 10, .1}];
f[x_] = Interpolation[Thread@{Table[x, {x, -10, 10, .1}], nsol}, x]
Plot[f[x], {x, -1, 1}]


Now this f[x] can be used in further calculations!

Let's check the obtained interpolated function f(x) is correct or not!

 NIntegrate[g[t], {t, -10, 10}]  = 25.0755
f[10] - f[-10]                  = 25.0755


Hope This helps!

• it does, @Sachin Kumar ! Thanks so much for ur help Commented May 27, 2019 at 9:36
• @wendy, Good that it has helped you, Pl accept the answer. Commented May 27, 2019 at 9:42
• Better to use FunctionInterpolation. It'll be smarter about how it chooses points and the tests I've run suggest it's about four times as accurate as this method. Also it's faster. If you want to stick with Interpolation, at the very least it makes sense to create the grid of points and the interpolated values in the same Table call. Commented May 27, 2019 at 16:26