MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Nested numerical integral - speed: Is it suppose to be so slow?


Hello Sune,
I believe you can work symbolically:

trap[t_, t1_, t2_, a_] :=
 Piecewise[{{0, t < 0 || t >= t1 + t2}, {a t,
    t >= 0 && t < t1}, {a t1, t >= t1 && t < t2}, {a (-t + t1 + t2),
    t >= t2 && t < t1 + t2}}]

tplus = Integrate[trap[t, t1, t2, a], {u, 0, t},
  Assumptions -> Element[{g, a, \[Delta], \[CapitalDelta], t}, Reals]]

tminus = Integrate[trap[t - 2 \[CapitalDelta], t1, t2, a], {u, 0, t},
  Assumptions -> Element[{g, a, \[Delta], \[CapitalDelta], t}, Reals]]

inttminus =
 Integrate[tminus, {u, 0, t},
  Assumptions -> Element[{g, a, \[Delta], \[CapitalDelta], t}, Reals]]

inttplus =
 Integrate[tplus, {u, 0, t},
  Assumptions -> Element[{g, a, \[Delta], \[CapitalDelta], t}, Reals]]

baSym = (2.675222/10)^2 ( inttplus - inttminus)


baSym /. {t -> 5.5,
  a -> 100000, \[CapitalDelta] -> 12, \[Delta] -> 0.25}
(*the result depends on t1 and t2 which are undefined?*)



W Craig Carter
Professor of Materials Science, MIT



On Aug 9, , at Thu Aug 9, 12 @3:53 AM, Sune wrote:

> In[22]:= ba[g_,a_,\[CapitalDelta]_,\[Delta]_]:=(2.675222/10)^2 NIntegrate[Fa[x,g,a,\[CapitalDelta],\[Delta]]^2,{x,0,\[Delta]+2 \[CapitalDelta]}]




  • Prev by Date: Re: Simplify Binomial
  • Next by Date: Re: Nested numerical integral - speed: Is it suppose to be
  • Previous by thread: Nested numerical integral - speed: Is it suppose to be so slow?
  • Next by thread: Re: Nested numerical integral - speed: Is it suppose to be