# How can I solve this integration numerically? [closed]

how can I integrate this function numerically w.r.t r from 1 to 8, the function is as,

 1/(1 - 4 m /(r Sqrt[π]) {GammaRegularized[3/2, r^2/(4 θ)]}

• Do you know Integrate? BTW, your equation does not make sense. Why did a list appear? – happy fish Jul 7 '16 at 10:30
• If r is a variable, you shouldn't use it as function: (r [Sqrt][Pi]) – Coolwater Jul 7 '16 at 10:31
• in this integration, r=1 is lower and r = 8 is upper limit – Emlie Jul 7 '16 at 11:12

To answer this ill-posed question, we need to know the following,

1. Values of m and θ which to do not produce a singularity in the integrand in the domain of interest, {r, 1, 8}. I choose m = 20 and θ = 4 π, more or less arbitrarily.

2. A syntactically correct integrand. I am guessing you want

1/(1 - 4 m/(r Sqrt[π]) GammaRegularized[3/2, r^2/(4 θ)])


With those choices, you can use NIntegrate to get a value.

With[{m = 20, θ = 4 π},
NIntegrate[1/(1 - 4 m/(r Sqrt[π]) GammaRegularized[3/2, r^2/(4 θ)]), {r, 1, 8}]]


-1.28077

Note: you can not use square brackets [ ] or curly brackets { } as higher-level parentheses in Mathematica.

• @ravi. Great -- use whatever values that will row your boat. – m_goldberg Jul 7 '16 at 11:15
• @ravi. Don't ask an additional question as a comment to an answer. Post it as new question. – m_goldberg Jul 7 '16 at 12:16