1
$\begingroup$

I am trying to integrate a function Gamma, but the output returns the input. I have the following code:

valuesfs = {r -> 50*10^-6, c -> 3*10^8*10^-15, Δt -> 55,
    m -> 9.11*10^-31, ϵ -> 8.85*10^-12*10^30, ϵip ->
     5.2*1.602*10^-19, 
   e -> 1.602*10^-19, λ -> 1300*10^-9, ℏ -> 
    1.054*10^-34*10^15, Γ0 -> 5, t0 -> 100, n -> 0.48, 
   Ip -> 5*10^17*10^-15};(*list of constants*)

E0 = Sqrt[(2 Ip)/(c*n*ϵ)] //. valuesfs;
Eenv[t_] = E0*E^-((t - t0)/(0.5*Δt))^2 //. valuesfs;
Ef[t_] = Cos[ω*t] //. valuesfs;
El[t_] = Eenv[t]*Ef[t];

Eexp = 1/(ℏ e) Sqrt[2 m] ϵip^(3/2) //. valuesfs;
El[t0] //. valuesfs;
(Eexp/Eenv[t0])^-1 //. valuesfs;

Γ[t_] = Exp[Eexp/Eenv[t]] Γ0 //. valuesfs
Ne = Integrate[Γ[tp], {tp, 0, 200}]

I want to know what value of Ne becomes when Gamma is integrated, but the output of Ne equals the unevaluated input. Can someone tell me what I am doing wrong?

$\endgroup$
  • 1
    $\begingroup$ NIntegrateevaluates 4.964292696444819*10^521122. If this magnitude is expected try to Rationalizethe integrand! $\endgroup$ – Ulrich Neumann Mar 27 '19 at 11:27
  • $\begingroup$ Note that the value of the integral from tp = 0 to tp = 199.999 is negligible compared to the integral from tp = 199.999 totp = 200, at machine precision. (The ratio is less than 10^-16.) $\endgroup$ – Michael E2 Dec 22 '19 at 17:29
0
$\begingroup$

Just use

// N 

to force numeric evaluation.

Ne = Integrate[Γ[tp], {tp, 0, 200}] // N
|improve this answer|||||
$\endgroup$
  • 3
    $\begingroup$ Much neater to use NIntegrate then, no? $\endgroup$ – MarcoB Mar 27 '19 at 15:51
  • $\begingroup$ i think so it's the same, but sometimes i just use //N to force evaluation to numeric value in any solution $\endgroup$ – Alrubaie Mar 27 '19 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.