Guest User

Untitled

a guest
Oct 18th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Integrate[(Sin[n t/2]/Sin[t/2])^2, {t, 0, Pi}]~Table~{n, 10} // Timing
  2.  
  3. {2.17188, {π, 2π, 3π, 4π, 5π, 6π, 7π, 8π, 9π, 10π}}
  4.  
  5. Integrate[(Sin[n t/2]/Sin[t/2])^2, {t, 0, Pi},
  6. Assumptions -> n ∈ Integers] // Timing
  7. %[[-1]] ~ FunctionExpand ~ (Assumptions -> n ∈ Integers)
  8. % // FullSimplify
  9.  
  10. -(1/2) I E^(-I n π) (1 + E^(2 I n π) +
  11. 2 E^(I n π) n π Cot[n π] + n PolyGamma[0, 1/2 - n/2] -
  12. n PolyGamma[0, -(n/2)] + E^(2 I n π) n PolyGamma[0, n/2] -
  13. E^(2 I n π) n PolyGamma[0, (1 + n)/2])
Add Comment
Please, Sign In to add comment