Skip to main content
added 387 characters in body
Source Link
Mariusz Iwaniuk
  • 16.4k
  • 1
  • 27
  • 46

To get rid of condition like If I use a trick:

G = LaplaceTransform[Integrate[InverseLaplaceTransform[
(a Sin[y/2]^2)/(b - c*Cos[y]), b, s], {y, -Pi, Pi}], s, b] /. {a -> 16 Sin[2 x]^2, 
b -> 3 + Cos[4 x], c -> 2* Sin[2 x]^2}
G1 = FullSimplify[G, Assumptions -> {-Pi <= x <= Pi}] // Expand

(*8 π - 8 π Abs[Cos[2 x]]*)

another way:

F[x_, y_] := (16 Sin[2*x]^2 Sin[y/2]^2)/(3 + Cos[4*x] - 2 Cos[y] Sin[2*x]^2); 
G2 = 2 Integrate[F[x, y], {y, 0, Pi}, Assumptions -> -Pi <= x <= Pi] // Expand
(*Simpler solution than OP answer*)

(*8 π - 4 π Abs[Sec[2 x]] - 4 π Abs[Sec[2 x]] Cos[4 x]*)

Limit[G2, x -> Pi/4] // Quiet(*Need a Limit to get a value!*)
(*8 π*)

To get rid of condition like If I use a trick:

G = LaplaceTransform[Integrate[InverseLaplaceTransform[
(a Sin[y/2]^2)/(b - c*Cos[y]), b, s], {y, -Pi, Pi}], s, b] /. {a -> 16 Sin[2 x]^2, 
b -> 3 + Cos[4 x], c -> 2* Sin[2 x]^2}
G1 = FullSimplify[G, Assumptions -> {-Pi <= x <= Pi}] // Expand

(*8 π - 8 π Abs[Cos[2 x]]*)

To get rid of condition like If I use a trick:

G = LaplaceTransform[Integrate[InverseLaplaceTransform[
(a Sin[y/2]^2)/(b - c*Cos[y]), b, s], {y, -Pi, Pi}], s, b] /. {a -> 16 Sin[2 x]^2, 
b -> 3 + Cos[4 x], c -> 2* Sin[2 x]^2}
G1 = FullSimplify[G, Assumptions -> {-Pi <= x <= Pi}] // Expand

(*8 π - 8 π Abs[Cos[2 x]]*)

another way:

F[x_, y_] := (16 Sin[2*x]^2 Sin[y/2]^2)/(3 + Cos[4*x] - 2 Cos[y] Sin[2*x]^2); 
G2 = 2 Integrate[F[x, y], {y, 0, Pi}, Assumptions -> -Pi <= x <= Pi] // Expand
(*Simpler solution than OP answer*)

(*8 π - 4 π Abs[Sec[2 x]] - 4 π Abs[Sec[2 x]] Cos[4 x]*)

Limit[G2, x -> Pi/4] // Quiet(*Need a Limit to get a value!*)
(*8 π*)
Source Link
Mariusz Iwaniuk
  • 16.4k
  • 1
  • 27
  • 46

To get rid of condition like If I use a trick:

G = LaplaceTransform[Integrate[InverseLaplaceTransform[
(a Sin[y/2]^2)/(b - c*Cos[y]), b, s], {y, -Pi, Pi}], s, b] /. {a -> 16 Sin[2 x]^2, 
b -> 3 + Cos[4 x], c -> 2* Sin[2 x]^2}
G1 = FullSimplify[G, Assumptions -> {-Pi <= x <= Pi}] // Expand

(*8 π - 8 π Abs[Cos[2 x]]*)