Message Boards Message Boards

[✓] Integrate a given symbolic limit of integration?

GROUPS:

Hi, I am new to Mathematica. Please advise how I can obtain the symbolic result of the following integral, where n is a positive integer and a is a real number. Thank you.

enter image description here

POSTED BY: Aidan Droogan
Answer
15 days ago

You can use Simplify:

Simplify[Integrate[(2 x^2)/a Sin[n*Pi*x/a]^2, {x, 0, a}], 
 Element[n, Integers]]

or Assuming:

Assuming[Element[n, Integers], 
 Integrate[(2 x^2)/a Sin[n*Pi*x/a]^2, {x, 0, a}]]

Assumptions inside Integrate has no particular effect:

Integrate[(2 x^2)/a Sin[n*Pi*x/a]^2, {x, 0, a}, 
 Assumptions -> Element[n, Integers]]
POSTED BY: Gianluca Gorni
Answer
15 days ago

With correct syntax:

In[2]:= Integrate[(2 x^2/a) Sin[n Pi x/a]^2, {x, 0, a}]

Out[2]= (a^2 (4 n^3 \[Pi]^3 - 
   6 n \[Pi] Cos[2 n \[Pi]] + (3 - 6 n^2 \[Pi]^2) Sin[
     2 n \[Pi]]))/(12 n^3 \[Pi]^3)
POSTED BY: S M Blinder
Answer
15 days ago

Thank you very much for your help, now solved. I had placed the assumptions inside the Integrate command [ ] and was getting the error message "Invalid integration variable or limit(s) in n "is a member of" Z". This error message did not clarify the situation for me!

POSTED BY: Aidan Droogan
Answer
15 days ago

"I had placed the assumptions inside the Integrate command [ ] and ..."

Which raises the question: Why was this code not indicated in the original post? If you do not provide actual code then (i) Nobody can diagnose for possible mistakes and (ii) everyone who wishes to work on the problem has to retype the input for themselves.

POSTED BY: Daniel Lichtblau
Answer
15 days ago

Group Abstract Group Abstract