- #1

- 1,462

- 44

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Mathematica
- Thread starter Mr Davis 97
- Start date

- #1

- 1,462

- 44

- #2

tnich

Homework Helper

- 1,048

- 336

Looks like you have only specified the lower limits of the sum and product (1), but no the upper limits (3).

- #3

- 1,462

- 44

Oh. I meant int (Product[x+r, {r, 3}])*(1+ x*(Sum[1/(x+r), {r, 3}])) dx from 0 to 1. But this doesn't work either... Everything works when I remove that x right by the sum, but doesn't work when I add it in.Looks like you have only specified the lower limits of the sum and product (1), but no the upper limits (3).

- #4

tnich

Homework Helper

- 1,048

- 336

Try putting the ##x## inside the sum.Oh. I meant int (Product[x+r, {r, 3}])*(1+ x*(Sum[1/(x+r), {r, 3}])) dx from 0 to 1. But this doesn't work either... Everything works when I remove that x right by the sum, but doesn't work when I add it in.

- #5

tnich

Homework Helper

- 1,048

- 336

It looks to me like the integral doesn't converge. Try doing the integral analytically (using the calculus) instead of numerically (using Mathematica) and see what you get.Try putting the ##x## inside the sum.

- #6

tnich

Homework Helper

- 1,048

- 336

Now I'm not sure that it doesn't converge, but still, multiply out the terms in the integral, do the integration, and see what you get. Then you will know if your are getting the right answer from Mathematica.It looks to me like the integral doesn't converge. Try doing the integral analytically (using the calculus) instead of numerically (using Mathematica) and see what you get.

- #7

lurflurf

Homework Helper

- 2,440

- 138

Try one of these

Integrate[x (x + 1) (x + 2) (x + 3) (1/x + 1/(x + 1) + 1/(x + 2) + 1/(x + 3)), {x, 0, 1}]

Integrate[Product[x + y, {y, 3}] (1 + x Sum[1/(x + z), {z, 3}]), {x, 0, 1}]

Integrate[Sum[Product[x + y, {y, 0, 3}]/(x + z), {z, 0, 3}], {x, 0, 1}]

Integrate[Product[x + y, {y, 3}] Sum[x/(x + z), {z, 0, 3}], {x, 0, 1}]

Integrate[Sum[Pochhammer[x, 4]/(x + z), {z, 0, 3}], {x, 0, 1}]

Does anyone know a shorter way than five?

int (Product[x + r, {r, 1}])*(1 + x*(Sum[1/(x + r), {r, 1}])) dx

Integrate[Product[x + r, {r, 3}] (1 + x*(Sum[1/(x + r), {r, 3}])), {x, 0, 1}]

is the closest Mathematica form to what you wrote Wolframalpha has less strict syntax.

- #8

- 302

- 152

$$\int_{0}^1( 4x^3+18x^2 + 22x +6)dx=20$$

Peace,

Fred

- #9

tnich

Homework Helper

- 1,048

- 336

I get the same integrand, but 24 for the numerical result.

$$\int_{0}^1( 4x^3+18x^2 + 22x +6)dx=20$$

Peace,

Fred

- #10

- 302

- 152

Your right--my bad. I'm getting too old to integrate polynomials in my head.I get the same integrand, but 24 for the numerical result.

Peace,

Fred

- #11

lurflurf

Homework Helper

- 2,440

- 138

You used a numerical approach as 20 is a (wrong) number.

$$\int_{0}^1( 4x^3+18x^2 + 22x +6)dx=20$$

Peace,

Fred

Integration by parts or substitution can be used to avoid expanding the polynomial.

That reminds me of a nice thing

general result

Differences[Pochhammer[{0, 1}, n]]

Integrate[D[Pochhammer[x, n], x], {x, 0, 1}]

##\int_0^1\mathrm{d}(x)_n=(1)_n-(0)_n=n!##

specific n=4

Differences[Pochhammer[{0, 1}, 4]]

Integrate[D[Pochhammer[x, n], x], {x, 0, 1}]

##\int_0^1\mathrm{d}(x)_4=(1)_4-(0)_4=4!##

Share: