# Plotting an integral as a function of a variable

I want to plot

F[x_] :=
Integrate[
(1/
(1 +
(64*x^2*Sin[y]^2*Sin[(1/2)*Sqrt[(-8 + x)^2 - x^2*Sin[y]^2]]^2)/
(((-8 + x)^2 - x^2*Sin[y]^2)*(x^2 - x^2*Sin[y]^2))))*Cos[y],
{y, -(Pi/2), Pi/2}]


over the interval {x, 0, 30}.

I am trying:

Plot[F[x], {x, 0, 30}]


but without success. How can I do it?

• Wouldn't a numerical approach make more sense for plotting?: Clear[F]; F[x_?NumericQ]:= NIntegrate[...] – Michael E2 May 9 '17 at 0:37
• I am very sorry, Thank you very much for your appreciable help – Kimou May 9 '17 at 9:37

As Michael E2 advises in his comment, defining F as a numeric function works well when you want to see a plot.

F[x_?NumericQ] :=
NIntegrate[
(1/
(1 +
(64*x^2*Sin[y]^2*Sin[(1/2)*Sqrt[(-8 + x)^2 - x^2*Sin[y]^2]]^2)/
(((-8 + x)^2 - x^2*Sin[y]^2)*(x^2 - x^2*Sin[y]^2))))*Cos[y],
{y, -(Pi/2), Pi/2}]

Plot[F[x], {x, 0, 30}, AxesOrigin -> {0, 0}]


• That's what i want. Thank you – Kimou May 9 '17 at 9:40