I am trying to find out the analytical form of the answer of the following integration,

$$I=\int_0^l r \, dr \int_0^{2\pi} \, d\phi (iks)[ \frac{\exp [ikx_0(N+r^2)^{1/2}]}{[x_0(N+r^2)^{1/2}]}\frac{\exp[ikx_0(Q+2r\sin\phi+r^2)^{1/2}]}{(Q+2r\sin\phi+r^2)}]$$ Where, $x_0,N,Q,s $ are constants. $s$ and $x_0$ have same dimension of length; i.e. their ratio will be a real positive number only as per the physical condition of the problem. $N,Q$ are also dimensionless real positive constants.$k$ is the wave vector, i.e. $k=\frac{2\pi}{\lambda}$. So, this is also a real positive constant.I tried to write the program in the following format,

i = (-1)^(1/2);
f[r_, \[Phi]_] := (
   y =d (N + r^2)^(1/2);
   z=Q+2*r*Sin [\[Phi]]+r^2; (i*k*s)*Exp[i*k*y] /(y)* (Exp[i*k*q^(1/2)]/q)*r 
Assuming[k>0 && Q>0 && d>0 && N>0 && s>0,Integrate[f[r,\[Phi]],{r,0, \

Where, $x_0$ is replaced by $d$. $L$ is the upper limit of the integration of $r$. It is a number say, o.5 Would you kindly suggest me how can I get the answer in analytical form of the above integral and also can improve the skill of programming in mathematica for this type of cases? Thanking you.....

**UPDATE:**The expression denoted by $z$ in the above syntax,will be replaced by $q$. it was typed by mistake.$q$ is involved in the function.THE CORRECT EXPRESSION WILL BE

q=Q+2*r*Sin [\[Phi]]+r^2

While applying the same syntax, answered by Sir Bill Watts, for this new case, nothing comes out.Would you kindly suggest me the correct procedure to solve this.

  • $\begingroup$ Is that really y = in your difinition of f? Also MMa knows that I is Sqrt[-1], so you don't need to define i if you replace it by I in your code. $\endgroup$
    – Bill Watts
    Commented Aug 25, 2018 at 7:10

1 Answer 1


Looks like your code works once you clean up the syntax some.


y=d (N+r^2)^(1/2)



-((2*Pi*s*E^(I*k*Sqrt[q])*(E^(I*d*k*Sqrt[N]) - E^(I*d*k*Sqrt[L^2 + N])))/(d^2*q))

I have moved definitions for y and z outside your definition for f. Normally you would use Block or Module for multiline definitions. I still have doubts as to whether I changed your code to what you mean, so you should check it.

  • $\begingroup$ Sir, Thanks a lot.If I have any queries further, I shall ask then for further suggestion.... $\endgroup$ Commented Aug 25, 2018 at 8:29
  • $\begingroup$ Sir, there is a mistake, I overlooked.I am very sorry for that.In the above case, the expression defined as $z$ will be replaced by $q$. While putting this change in the said syntax, no output is come out. Would you kindle check the case once again. I have edited the question. thanks ... $\endgroup$ Commented Aug 25, 2018 at 15:07

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.