2
$\begingroup$

I have some problem to integrate the expression given below:

hN = 5; γ = 30; ρ = 1200; cp = 1200; k = 0.2; 
w0 = 150*10^-6; α = k/(ρ*cp); τ = 0; 
ab = hN/(hN - γ*k)*Exp[hN^2/k*α (t - τ)]* Erfc[hN/k*Sqrt[α (t - τ)]];
ac = (γ*k)/(hN - γ*k)* Exp[γ^2*α (t - τ)]* Erfc[γ*Sqrt[α (t - τ)]]; 
cd = (ab - ac);

Integrate[
  Exp[-2*r^2/8*α*(t - τ) + w0^2]/(8*α*(t - τ) + w0^2)*cd, 
  {t, 0, .001}
]
$\endgroup$
5
  • $\begingroup$ You haven't set a value for r. Are you trying to get the integral as a function of r? Setting r = 1 and using NIntegrate (Integrate can't cope, so do it numerically) seems to evaluate fine. $\endgroup$ Commented Aug 21, 2017 at 12:01
  • $\begingroup$ Yes ,I want to integral in term of r. $\endgroup$ Commented Aug 21, 2017 at 12:42
  • 1
    $\begingroup$ So, why was there a period in the title, Gopal? $\endgroup$ Commented Aug 21, 2017 at 14:59
  • 1
    $\begingroup$ This is an almost constant function of r. Here are some values obtained by numerical integration:$0.5 \to 43360.85509867566,\, 0. \to 43360.85509886233,\, 20 \to 43360.85480019366.$ $\endgroup$
    – user64494
    Commented Aug 21, 2017 at 16:56
  • 1
    $\begingroup$ @user64494 Not really. You just didn't span a large enough value of $r$ to see an appreciable change. $\endgroup$
    – MarcoB
    Commented Aug 21, 2017 at 20:28

2 Answers 2

2
$\begingroup$
   Finally, I got our results that I want.
         hN = 5; \[Gamma] = 30; \[Rho] = 1200; cp = 1200; k = 0.2;
        w0 = 150*10^-6; \[Alpha] = k/(\[Rho]*cp); \[Tau] = 0;
         ab = hN/(hN - \[Gamma]*k)*Exp[hN^2/k*\[Alpha] (t - \[Tau])]*
       Erfc[hN/k*Sqrt[\[Alpha] (t - \[Tau])]];
        ac = (\[Gamma]*k)/(hN - \[Gamma]*k)*
       Exp[\[Gamma]^2*\[Alpha] (t - \[Tau])]*
       Erfc[\[Gamma]*Sqrt[\[Alpha] (t - \[Tau])]];
         cd = (ab - ac);
        int[r_?NumericQ, u_?NumericQ] := 
        NIntegrate[
       Exp[-2*r^2/8*\[Alpha]*(t - \[Tau]) + 
      w0^2]/(8*\[Alpha]*(t - \[Tau]) + w0^2) cd, {t, 0, u}]
      Plot[Evaluate[Table[int[r, u], {u, 0.04, 1, .2}]], {r, -10^5, 10^5}, 
       PlotRange -> All]

enter image description here

$\endgroup$
1
$\begingroup$

Symbolic integration seems to take forever, and a solution is not guaranteed. If you can make do with numerical values, however, numerical integration is very fast:

Clear[int]
int[r_?NumericQ] := NIntegrate[
  Exp[-2*r^2/8*α*(t - τ) + w0^2]/(8*α*(t - τ) + w0^2)*cd, {t, 0, .001}]

Plot[int[x], {x, -10^6, 10^6}]

Mathematica graphics

$\endgroup$
3
  • $\begingroup$ Thanks, Actually I want to make a table of graph ( e.g. t=(0,.001,.002,..) in same graph and x-axis range. $\endgroup$ Commented Aug 21, 2017 at 22:17
  • 1
    $\begingroup$ @GopalVerma I'm not sure I understand. You want to plot the value of the integral as you change the limits of integration? For a constant value of $r$? Or you want a 3D plot, as a function of $t_{max}$ and $r$? $\endgroup$
    – MarcoB
    Commented Aug 21, 2017 at 22:51
  • $\begingroup$ Yes, I want to plot the value of integral by changing the limit, but in same graph,I want to plot it for compaion. $\endgroup$ Commented Aug 22, 2017 at 8:16

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.