Michael E2 and Bob have solved the integral. Here is an alternative method which might be of interest as well. I have used the similar method already in How to solve this integration?.
We solve the integral transforming it into a complex contour integral which, after a simple binomial expansion, can easily be soved by the Cauchy theorem. The remaining infinte sum can be expressed by a hypergeometric function which reduces to a modified Bessel function of the first kind.
Let
f := Exp[Cos[x] + Sin[x]]*Sin[Sin[x] + Cos[x] - x]
g := Integrate[f, {x, 0, 2 \[Pi]}]
First we shall use the exponential form of the Sin[] outside the Exp[] function in f (in the end we take the imaginary part)
Sin[Sin[x] + Cos[x] - x] == Im[Exp[I (Sin[x] + Cos[x] - x)]];
ComplexExpand[%]
(* Out[812]= True *)
so that the argument of the Exp[]
function becomes
Cos[x] + Sin[x] + I (Cos[x] + Sin[x] - x)
which can be written as
Exp[I x] + I Exp[-I x] - I x
The integral g
then becomes
g := Integrate[Exp[Exp[I x] + I Exp[-I x] - I x], {x, 0, 2 \[Pi]}]
Now with the substitution
{z -> Exp[-I x], dz = -I z dx};
g
simplifies to a contour integral around the origin
h = I Integrate[Exp[1/z + I z], {z, 1, I, -1, -I, 1}]
(* Out[814]= Integrate[E^(1/z + I z), {z, 1, I, -1, -I, 1}] *)
As this integral is returned unevaluated we expand the Exp[] function in a power series.
A typical term can in turn be expanded into a binomial sum
(1/z + I z)^n == Sum[Binomial[n, k] z^-k (I z)^(n - k), {k, 0, n}] ==
Sum[Binomial[n, k] z^(n - 2 k) I^(n - k), {k, 0, n}];
Now, by the Cauchy theorem, the contour integral of integer powers of z
is only different from zero for the first negative power. Examples are
Table[{m, Integrate[z^m, {z, 1, I, -1, -I, 1}]}, {m, -2, 1}]
(* Out[820]= {{-2, 0}, {-1, 2 I \[Pi]}, {0, 0}, {1, 0}} *)
Hence we have the condition
Reduce[n - 2 k == -1, Integers ] /. C[1] -> m
(* Out[827]= m \[Element] Integers && k == m && n == -1 + 2 m *)
Taking into account the factor 2 \[Pi] I
from the integration and the 1/n!
from the Exp[]
function we arrive at the sum which is immediatey evaluated by Mathematica:
h1 = 2 \[Pi] Sum[
1/(2 m - 1)! Binomial[2 m - 1, m] I^(m - 1), {m, 0, \[Infinity]}]
(* Out[843]= -2 (-1)^(3/4) \[Pi] BesselI[1, 2 (-1)^(1/4)] *)
The original integral is the imaginary part of h1
.
Numerically
h1 // N
(* Out[868]= 5.76177 + 3.09803 I *)
Another form of h1 is obtained by expressing (-1) in exponential form
h1 /. (-1)^c_ -> Exp[I \[Pi] c]
(* Out[865]= -2 E^((3 I \[Pi])/4) \[Pi] BesselI[1, 2 E^((I \[Pi])/4)] *)
Which can be simplified to
FullSimplify[%]
(* Out[866]= 2 \[Pi] Hypergeometric0F1Regularized[2, I] *)
% // N
(* Out[867]= 5.76177 + 3.09803 I *)