# problem with constant variables

Variable x is supposed to be constant, but the program calculates for each variable x, 100 numbers of x. I want all my x variables to have the same definition, but the program constantly changes each x variable's definition.

https://1drv.ms/u/s!AqOJ6xqR2PKjglEgVfbcNx8XyKX5?e=SdAOHZ

• Your definition x=Table[...] creates a list called x. Please clarify what you want to calculate! – Ulrich Neumann Aug 13 at 13:18

I'm not sure I've understood your NB, but probably this is what you want:

ddQ2[x_] = \!$$\*SubsuperscriptBox[\(\[Integral]$$, $$x$$, $$1$$]$$z \((1 - z)$$*$$(0.288554*\*SuperscriptBox[\((1 - \*FractionBox[\(x$$, $$z$$])\), $$0.435 - 1$$]/\*SqrtBox[FractionBox[$$x$$, $$z$$]])\) \[DifferentialD]z\)\)


Then make ListPlot:

ListPlot[ddQ2[#] & /@ Table[j/100, {j, 1, 100}],PlotRange->All] • Equivalent in InputForm. ddQ2[x_] = Integrate[ z*(1 - z)*(0.288554*((1 - x/z)^(0.435 - 1)/Sqrt[x/z])), {z, x, 1}] – Rohit Namjoshi Aug 13 at 17:24
x = Table[j/100, {j, 1, 100}];


Since x is a List, Map the integration onto the List. Since you are using inexact numbers, NIntegrate is as good as Integrate and is much faster.

{#, Integrate[z*(1 - z)*(0.288554*((1 - #/z)^(0.435 - 1)/
Sqrt[#/z])), {z, #, 1}]} &[1/2] // AbsoluteTiming

(* {0.524199, {1/2, 0.0838901}} *)

{#, NIntegrate[z*(1 - z)*(0.288554*((1 - #/z)^(0.435 - 1)/
Sqrt[#/z])), {z, #, 1}]} &[1/2] // AbsoluteTiming

(* {0.007069, {1/2, 0.0838901}} *)

ddQ2 = {#, NIntegrate[z*(1 - z)*(0.288554*((1 - #/z)^(0.435 - 1)/
Sqrt[#/z])), {z, #, 1}]} & /@ x;

ListPlot[ddQ2, AxesLabel -> {"x", "ddQ2"}] 