Integration Helpintegrating a Green's function for a damped harmonic oscillatorUnderstanding output of multivariable integrationHow to numerically integrate this integral?Help with IntegrationPiecewise IntegrationIntegration with parameterIntegration of a Complex Function
Test if two food are the same
Translation Golf XLVIII — We're sorry to see you go
When can a graph be oriented to form a Hasse diagram of a finite poset?
Fill the Image Sequence Ep. 2
Is there a reason behind the 'Ending' joke?
A sentient carnivorous species trying to preserve life. How could they find a new food source?
What is the best DIY approach to keeping brake dust off your rims?
Does journal access significantly influence choice in which journal to publish in?
"a sign that one should be computing K-theory"
What is this plane with its thick cockpit?
How can I curtail abuse of the Illusion wizard's Illusory Reality feature?
My first random password generator
AD823 current sense
Can you be promoted and then fired for-cause? (Performance)
How do multiple castings of Demiplane interact with one another?
How to temporarily replace Latin characters with Greek
Forced Conversion of Majority
Primes from arithmetic and geometric progressions
Why CMYK & PNG is not possible?
Is any device installed on airplane to measure wind speed relative to the ground, and its direction?
Can something have more sugar per 100g than the percentage of sugar that's in it?
Relation between signal processing and control systems engineering?
Difference between $HOME and ~
Is it fine to ask this kind of question to the corresponding author of a paper?
Integration Help
integrating a Green's function for a damped harmonic oscillatorUnderstanding output of multivariable integrationHow to numerically integrate this integral?Help with IntegrationPiecewise IntegrationIntegration with parameterIntegration of a Complex Function
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
.everyonelovesstackoverflowposition:absolute;height:1px;width:1px;opacity:0;top:0;left:0;pointer-events:none;
$begingroup$
So I have to integrate $$fracsin^n xsin^n x + cos^n x$$ and am coding this in Mathematica with
(((Sin^n)[x])/(((Sin^n)[x]) + ((Cos^n)[x])))
with the bounds $0$ and $pi/2,$ where $n$ takes on various integer values.
I programmed the problem so that $n=1$ then $n=2$, etc...but every time I try to get the output, I only get back the integration symbol. For example, if I program $n=2$ and then do the integration command- the output is
(((Sin^2)[x])/(((Sin^2)[x]) + ((Cos^2)[x]))),
but does not solve it. Anyone know how to help or fix this??
Update: Even with the syntax fixed, Mathematica does not solve it, with or without assumptions:
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, Pi/2,
Assumptions -> n > 0 && n [Element] Integers]
calculus-and-analysis
$endgroup$
add a comment
|
$begingroup$
So I have to integrate $$fracsin^n xsin^n x + cos^n x$$ and am coding this in Mathematica with
(((Sin^n)[x])/(((Sin^n)[x]) + ((Cos^n)[x])))
with the bounds $0$ and $pi/2,$ where $n$ takes on various integer values.
I programmed the problem so that $n=1$ then $n=2$, etc...but every time I try to get the output, I only get back the integration symbol. For example, if I program $n=2$ and then do the integration command- the output is
(((Sin^2)[x])/(((Sin^2)[x]) + ((Cos^2)[x]))),
but does not solve it. Anyone know how to help or fix this??
Update: Even with the syntax fixed, Mathematica does not solve it, with or without assumptions:
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, Pi/2,
Assumptions -> n > 0 && n [Element] Integers]
calculus-and-analysis
$endgroup$
1
$begingroup$
Hello! It seems that you haven't included any code. Can you please include that here in the post? Based on your textual description my guess is that you are using(Sin^2)[x]when that syntax is incorrect, you should instead write it asSin[x]^2
$endgroup$
– enano9314
Apr 17 at 20:56
$begingroup$
Related: math.stackexchange.com/questions/82489/…
$endgroup$
– Michael E2
Apr 18 at 0:16
$begingroup$
Was it closed simply because of a syntax error by the OP? The integral with fixed syntax can be evaluated at specific values forn, as shown in two of the answers, but it cannot be evaluated with a unspecified parametern. (Of course we often get this kind of question, which reveals limitiations ofIntegrate.)
$endgroup$
– Michael E2
Apr 18 at 13:47
add a comment
|
$begingroup$
So I have to integrate $$fracsin^n xsin^n x + cos^n x$$ and am coding this in Mathematica with
(((Sin^n)[x])/(((Sin^n)[x]) + ((Cos^n)[x])))
with the bounds $0$ and $pi/2,$ where $n$ takes on various integer values.
I programmed the problem so that $n=1$ then $n=2$, etc...but every time I try to get the output, I only get back the integration symbol. For example, if I program $n=2$ and then do the integration command- the output is
(((Sin^2)[x])/(((Sin^2)[x]) + ((Cos^2)[x]))),
but does not solve it. Anyone know how to help or fix this??
Update: Even with the syntax fixed, Mathematica does not solve it, with or without assumptions:
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, Pi/2,
Assumptions -> n > 0 && n [Element] Integers]
calculus-and-analysis
$endgroup$
So I have to integrate $$fracsin^n xsin^n x + cos^n x$$ and am coding this in Mathematica with
(((Sin^n)[x])/(((Sin^n)[x]) + ((Cos^n)[x])))
with the bounds $0$ and $pi/2,$ where $n$ takes on various integer values.
I programmed the problem so that $n=1$ then $n=2$, etc...but every time I try to get the output, I only get back the integration symbol. For example, if I program $n=2$ and then do the integration command- the output is
(((Sin^2)[x])/(((Sin^2)[x]) + ((Cos^2)[x]))),
but does not solve it. Anyone know how to help or fix this??
Update: Even with the syntax fixed, Mathematica does not solve it, with or without assumptions:
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, Pi/2,
Assumptions -> n > 0 && n [Element] Integers]
calculus-and-analysis
calculus-and-analysis
edited Apr 21 at 16:14
Michael E2
159k13 gold badges219 silver badges518 bronze badges
159k13 gold badges219 silver badges518 bronze badges
asked Apr 17 at 20:43
KatieKatie
334 bronze badges
334 bronze badges
1
$begingroup$
Hello! It seems that you haven't included any code. Can you please include that here in the post? Based on your textual description my guess is that you are using(Sin^2)[x]when that syntax is incorrect, you should instead write it asSin[x]^2
$endgroup$
– enano9314
Apr 17 at 20:56
$begingroup$
Related: math.stackexchange.com/questions/82489/…
$endgroup$
– Michael E2
Apr 18 at 0:16
$begingroup$
Was it closed simply because of a syntax error by the OP? The integral with fixed syntax can be evaluated at specific values forn, as shown in two of the answers, but it cannot be evaluated with a unspecified parametern. (Of course we often get this kind of question, which reveals limitiations ofIntegrate.)
$endgroup$
– Michael E2
Apr 18 at 13:47
add a comment
|
1
$begingroup$
Hello! It seems that you haven't included any code. Can you please include that here in the post? Based on your textual description my guess is that you are using(Sin^2)[x]when that syntax is incorrect, you should instead write it asSin[x]^2
$endgroup$
– enano9314
Apr 17 at 20:56
$begingroup$
Related: math.stackexchange.com/questions/82489/…
$endgroup$
– Michael E2
Apr 18 at 0:16
$begingroup$
Was it closed simply because of a syntax error by the OP? The integral with fixed syntax can be evaluated at specific values forn, as shown in two of the answers, but it cannot be evaluated with a unspecified parametern. (Of course we often get this kind of question, which reveals limitiations ofIntegrate.)
$endgroup$
– Michael E2
Apr 18 at 13:47
1
1
$begingroup$
Hello! It seems that you haven't included any code. Can you please include that here in the post? Based on your textual description my guess is that you are using
(Sin^2)[x] when that syntax is incorrect, you should instead write it as Sin[x]^2$endgroup$
– enano9314
Apr 17 at 20:56
$begingroup$
Hello! It seems that you haven't included any code. Can you please include that here in the post? Based on your textual description my guess is that you are using
(Sin^2)[x] when that syntax is incorrect, you should instead write it as Sin[x]^2$endgroup$
– enano9314
Apr 17 at 20:56
$begingroup$
Related: math.stackexchange.com/questions/82489/…
$endgroup$
– Michael E2
Apr 18 at 0:16
$begingroup$
Related: math.stackexchange.com/questions/82489/…
$endgroup$
– Michael E2
Apr 18 at 0:16
$begingroup$
Was it closed simply because of a syntax error by the OP? The integral with fixed syntax can be evaluated at specific values for
n, as shown in two of the answers, but it cannot be evaluated with a unspecified parameter n. (Of course we often get this kind of question, which reveals limitiations of Integrate.)$endgroup$
– Michael E2
Apr 18 at 13:47
$begingroup$
Was it closed simply because of a syntax error by the OP? The integral with fixed syntax can be evaluated at specific values for
n, as shown in two of the answers, but it cannot be evaluated with a unspecified parameter n. (Of course we often get this kind of question, which reveals limitiations of Integrate.)$endgroup$
– Michael E2
Apr 18 at 13:47
add a comment
|
3 Answers
3
active
oldest
votes
$begingroup$
This works for me:
Table[Integrate[Sin[x]^n/(Sin[x]^n+Cos[x]^n),x,0,Pi/2],n,1,5]
And it gives the output Pi/4,Pi/4,Pi/4,Pi/4,Pi/4.

$endgroup$
1
$begingroup$
Recommend that you add aPlotto make it easier to understand why the result is a constant.
$endgroup$
– Bob Hanlon
Apr 17 at 21:11
$begingroup$
Good suggestion. Editing.
$endgroup$
– Kevin Ausman
Apr 17 at 21:38
add a comment
|
$begingroup$
Perhaps you're writing your function in the wrong format Emma. The following works fine:
n = 2;
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n),x, 0, π/2]
π/4
$endgroup$
$begingroup$
I believe you have the parentheses in the wrong place relative to the original question. Right idea for the solution, though.
$endgroup$
– Kevin Ausman
Apr 17 at 21:05
1
$begingroup$
Yes, just realized that, thanks for pointing it out.
$endgroup$
– amator2357
Apr 17 at 21:09
add a comment
|
$begingroup$
A common trick (see this Math.SE post):
$$int_a^b f(x) ; dx
buildrel x = a+b-u over = -int_b^a f(a + b - u) ; du
= int_a^b f(a + b - x) ; dx, ,$$
so therefore
$$int_a^b f(x) ; dx = int_b^a f(x) + f(a + b - x) over 2 ; dx, .$$
ClearAll[symmetrizeIntegrate];
SetAttributes[symmetrizeIntegrate, HoldAll];
symmetrizeIntegrate[Integrate[f_, x_, a_, b_, opts___]] :=
Integrate[(f + (f /. x -> a + b - x))/2, x, a, b, opts]
symmetrizeIntegrate[Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, [Pi]/2]]
(* π/4 *)
$endgroup$
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f195438%2fintegration-help%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
This works for me:
Table[Integrate[Sin[x]^n/(Sin[x]^n+Cos[x]^n),x,0,Pi/2],n,1,5]
And it gives the output Pi/4,Pi/4,Pi/4,Pi/4,Pi/4.

$endgroup$
1
$begingroup$
Recommend that you add aPlotto make it easier to understand why the result is a constant.
$endgroup$
– Bob Hanlon
Apr 17 at 21:11
$begingroup$
Good suggestion. Editing.
$endgroup$
– Kevin Ausman
Apr 17 at 21:38
add a comment
|
$begingroup$
This works for me:
Table[Integrate[Sin[x]^n/(Sin[x]^n+Cos[x]^n),x,0,Pi/2],n,1,5]
And it gives the output Pi/4,Pi/4,Pi/4,Pi/4,Pi/4.

$endgroup$
1
$begingroup$
Recommend that you add aPlotto make it easier to understand why the result is a constant.
$endgroup$
– Bob Hanlon
Apr 17 at 21:11
$begingroup$
Good suggestion. Editing.
$endgroup$
– Kevin Ausman
Apr 17 at 21:38
add a comment
|
$begingroup$
This works for me:
Table[Integrate[Sin[x]^n/(Sin[x]^n+Cos[x]^n),x,0,Pi/2],n,1,5]
And it gives the output Pi/4,Pi/4,Pi/4,Pi/4,Pi/4.

$endgroup$
This works for me:
Table[Integrate[Sin[x]^n/(Sin[x]^n+Cos[x]^n),x,0,Pi/2],n,1,5]
And it gives the output Pi/4,Pi/4,Pi/4,Pi/4,Pi/4.

edited Apr 17 at 21:40
answered Apr 17 at 21:03
Kevin AusmanKevin Ausman
1,2433 silver badges16 bronze badges
1,2433 silver badges16 bronze badges
1
$begingroup$
Recommend that you add aPlotto make it easier to understand why the result is a constant.
$endgroup$
– Bob Hanlon
Apr 17 at 21:11
$begingroup$
Good suggestion. Editing.
$endgroup$
– Kevin Ausman
Apr 17 at 21:38
add a comment
|
1
$begingroup$
Recommend that you add aPlotto make it easier to understand why the result is a constant.
$endgroup$
– Bob Hanlon
Apr 17 at 21:11
$begingroup$
Good suggestion. Editing.
$endgroup$
– Kevin Ausman
Apr 17 at 21:38
1
1
$begingroup$
Recommend that you add a
Plot to make it easier to understand why the result is a constant.$endgroup$
– Bob Hanlon
Apr 17 at 21:11
$begingroup$
Recommend that you add a
Plot to make it easier to understand why the result is a constant.$endgroup$
– Bob Hanlon
Apr 17 at 21:11
$begingroup$
Good suggestion. Editing.
$endgroup$
– Kevin Ausman
Apr 17 at 21:38
$begingroup$
Good suggestion. Editing.
$endgroup$
– Kevin Ausman
Apr 17 at 21:38
add a comment
|
$begingroup$
Perhaps you're writing your function in the wrong format Emma. The following works fine:
n = 2;
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n),x, 0, π/2]
π/4
$endgroup$
$begingroup$
I believe you have the parentheses in the wrong place relative to the original question. Right idea for the solution, though.
$endgroup$
– Kevin Ausman
Apr 17 at 21:05
1
$begingroup$
Yes, just realized that, thanks for pointing it out.
$endgroup$
– amator2357
Apr 17 at 21:09
add a comment
|
$begingroup$
Perhaps you're writing your function in the wrong format Emma. The following works fine:
n = 2;
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n),x, 0, π/2]
π/4
$endgroup$
$begingroup$
I believe you have the parentheses in the wrong place relative to the original question. Right idea for the solution, though.
$endgroup$
– Kevin Ausman
Apr 17 at 21:05
1
$begingroup$
Yes, just realized that, thanks for pointing it out.
$endgroup$
– amator2357
Apr 17 at 21:09
add a comment
|
$begingroup$
Perhaps you're writing your function in the wrong format Emma. The following works fine:
n = 2;
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n),x, 0, π/2]
π/4
$endgroup$
Perhaps you're writing your function in the wrong format Emma. The following works fine:
n = 2;
Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n),x, 0, π/2]
π/4
edited Apr 17 at 22:26
m_goldberg
91.9k8 gold badges75 silver badges210 bronze badges
91.9k8 gold badges75 silver badges210 bronze badges
answered Apr 17 at 20:57
amator2357amator2357
82010 bronze badges
82010 bronze badges
$begingroup$
I believe you have the parentheses in the wrong place relative to the original question. Right idea for the solution, though.
$endgroup$
– Kevin Ausman
Apr 17 at 21:05
1
$begingroup$
Yes, just realized that, thanks for pointing it out.
$endgroup$
– amator2357
Apr 17 at 21:09
add a comment
|
$begingroup$
I believe you have the parentheses in the wrong place relative to the original question. Right idea for the solution, though.
$endgroup$
– Kevin Ausman
Apr 17 at 21:05
1
$begingroup$
Yes, just realized that, thanks for pointing it out.
$endgroup$
– amator2357
Apr 17 at 21:09
$begingroup$
I believe you have the parentheses in the wrong place relative to the original question. Right idea for the solution, though.
$endgroup$
– Kevin Ausman
Apr 17 at 21:05
$begingroup$
I believe you have the parentheses in the wrong place relative to the original question. Right idea for the solution, though.
$endgroup$
– Kevin Ausman
Apr 17 at 21:05
1
1
$begingroup$
Yes, just realized that, thanks for pointing it out.
$endgroup$
– amator2357
Apr 17 at 21:09
$begingroup$
Yes, just realized that, thanks for pointing it out.
$endgroup$
– amator2357
Apr 17 at 21:09
add a comment
|
$begingroup$
A common trick (see this Math.SE post):
$$int_a^b f(x) ; dx
buildrel x = a+b-u over = -int_b^a f(a + b - u) ; du
= int_a^b f(a + b - x) ; dx, ,$$
so therefore
$$int_a^b f(x) ; dx = int_b^a f(x) + f(a + b - x) over 2 ; dx, .$$
ClearAll[symmetrizeIntegrate];
SetAttributes[symmetrizeIntegrate, HoldAll];
symmetrizeIntegrate[Integrate[f_, x_, a_, b_, opts___]] :=
Integrate[(f + (f /. x -> a + b - x))/2, x, a, b, opts]
symmetrizeIntegrate[Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, [Pi]/2]]
(* π/4 *)
$endgroup$
add a comment
|
$begingroup$
A common trick (see this Math.SE post):
$$int_a^b f(x) ; dx
buildrel x = a+b-u over = -int_b^a f(a + b - u) ; du
= int_a^b f(a + b - x) ; dx, ,$$
so therefore
$$int_a^b f(x) ; dx = int_b^a f(x) + f(a + b - x) over 2 ; dx, .$$
ClearAll[symmetrizeIntegrate];
SetAttributes[symmetrizeIntegrate, HoldAll];
symmetrizeIntegrate[Integrate[f_, x_, a_, b_, opts___]] :=
Integrate[(f + (f /. x -> a + b - x))/2, x, a, b, opts]
symmetrizeIntegrate[Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, [Pi]/2]]
(* π/4 *)
$endgroup$
add a comment
|
$begingroup$
A common trick (see this Math.SE post):
$$int_a^b f(x) ; dx
buildrel x = a+b-u over = -int_b^a f(a + b - u) ; du
= int_a^b f(a + b - x) ; dx, ,$$
so therefore
$$int_a^b f(x) ; dx = int_b^a f(x) + f(a + b - x) over 2 ; dx, .$$
ClearAll[symmetrizeIntegrate];
SetAttributes[symmetrizeIntegrate, HoldAll];
symmetrizeIntegrate[Integrate[f_, x_, a_, b_, opts___]] :=
Integrate[(f + (f /. x -> a + b - x))/2, x, a, b, opts]
symmetrizeIntegrate[Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, [Pi]/2]]
(* π/4 *)
$endgroup$
A common trick (see this Math.SE post):
$$int_a^b f(x) ; dx
buildrel x = a+b-u over = -int_b^a f(a + b - u) ; du
= int_a^b f(a + b - x) ; dx, ,$$
so therefore
$$int_a^b f(x) ; dx = int_b^a f(x) + f(a + b - x) over 2 ; dx, .$$
ClearAll[symmetrizeIntegrate];
SetAttributes[symmetrizeIntegrate, HoldAll];
symmetrizeIntegrate[Integrate[f_, x_, a_, b_, opts___]] :=
Integrate[(f + (f /. x -> a + b - x))/2, x, a, b, opts]
symmetrizeIntegrate[Integrate[Sin[x]^n/(Sin[x]^n + Cos[x]^n), x, 0, [Pi]/2]]
(* π/4 *)
edited Apr 18 at 13:38
answered Apr 18 at 0:26
Michael E2Michael E2
159k13 gold badges219 silver badges518 bronze badges
159k13 gold badges219 silver badges518 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f195438%2fintegration-help%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
Hello! It seems that you haven't included any code. Can you please include that here in the post? Based on your textual description my guess is that you are using
(Sin^2)[x]when that syntax is incorrect, you should instead write it asSin[x]^2$endgroup$
– enano9314
Apr 17 at 20:56
$begingroup$
Related: math.stackexchange.com/questions/82489/…
$endgroup$
– Michael E2
Apr 18 at 0:16
$begingroup$
Was it closed simply because of a syntax error by the OP? The integral with fixed syntax can be evaluated at specific values for
n, as shown in two of the answers, but it cannot be evaluated with a unspecified parametern. (Of course we often get this kind of question, which reveals limitiations ofIntegrate.)$endgroup$
– Michael E2
Apr 18 at 13:47