# Plot integral expression

Trying to plot in Mathematica with an integral as the iterator

Plot[x, {Integrate[1/Sqrt[0.31*x + 0.68*x^4 + 0.01*x^2], x], 0, 10^7}]


But get the error that it the integral can't be used as an iterator. On the other hand if I try

Plot[Integrate[1/Sqrt[0.31*x + 0.68*x^4 + 0.01*x^2], x], {x, 0, 10^7}]


I get the 'invalid integration variable or limit' error.

• You try to plot something like Plot[x,{f[x],f0,f1}]? That's only possible, I think, if you know the InverseFunction of f: Plot[InverseFunction[f[x]],{f ,f0,f1}] Commented Mar 21, 2020 at 16:12

  Plot[x, {Integrate[1/Sqrt[0.31*x + 0.68*x^4 + 0.01*x^2], x], 0, 10^7}]


This is not going to work, because Plot has the form Plot[f[x],{x,from,to}] and so you need a symbol in x and not Integrate in there.

   Plot[Integrate[1/Sqrt[0.31*x + 0.68*x^4 + 0.01*x^2], x], {x, 0, 10^7}]


For this one, you can make it to work like this

foo[to_?NumericQ] :=
Module[{x}, NIntegrate[1/Sqrt[0.31*x + 0.68*x^4 + 0.01*x^2], {x, 0, to}]];

Plot[foo[x], {x, 0, 10}, AxesOrigin -> {0, 0}]