3
$\begingroup$

I'm trying to plot the result of a double Integral

Plot[
   Integrate[Integrate[x^7 (x - 2)^4 (x - 3)^9, x], x]
   ,{x, -10, 10}
   ]

Results in a 22-degree polynomial, but why doesn't the above Plot work?

Can you update the Answer to state/explain why x=2 is not the point of inflection but x=0,3 are?

$\endgroup$
1
  • 4
    $\begingroup$ Use Evaluate or do p = Integrate[Integrate[x^7*(x - 2)^4*(x - 3)^9, x], x]; Plot[p, {x, -10, 10}] screen shot !Mathematica graphics $\endgroup$
    – Nasser
    Commented Dec 3, 2021 at 5:50

1 Answer 1

7
$\begingroup$

Try this:

f[x_] = Integrate[Integrate[x^7 (x - 2)^4 (x - 3)^9, x], x]

Plot:

Plot[f[x], {x, 2, 4.1}, PlotRange -> All, AspectRatio -> 1/GoldenRatio]

enter image description here

$\endgroup$
3
  • 2
    $\begingroup$ Thanks! Now why doesn't this function have a point of inflection at 2? (only 0 and 3). Could I have seen that just by looking at f" instead of plotting it? Even the 0 and 3 do not show from the plot, unless it's zoomed out a lot. $\endgroup$
    – Steve237
    Commented Dec 3, 2021 at 6:09
  • 1
    $\begingroup$ If you are going to make a function, you might consider making it immediate assignment instead of delayed, and then no need to do evaluate. As in f[x_] = Integrate[Integrate[x^7 (x - 2)^4 (x - 3)^9, x], x]; Plot[f[x], {x, -10, 10}, AspectRatio -> 1/GoldenRatio] Only first time it will automatically evaluate the integral, but future calls will not. Just another option. Both methods work the same way. $\endgroup$
    – Nasser
    Commented Dec 3, 2021 at 6:11
  • $\begingroup$ @E. Chan-López: See updated question plz $\endgroup$
    – Steve237
    Commented Dec 3, 2021 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.