Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11301 > unrolled thread
| Started by | W Craig Carter <ccarter@MIT.EDU> |
|---|---|
| First post | 2012-08-10 06:42 +0000 |
| Last post | 2012-08-10 06:42 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Nested numerical integral - speed: Is it suppose to be so slow? W Craig Carter <ccarter@MIT.EDU> - 2012-08-10 06:42 +0000
| From | W Craig Carter <ccarter@MIT.EDU> |
|---|---|
| Date | 2012-08-10 06:42 +0000 |
| Subject | Re: Nested numerical integral - speed: Is it suppose to be so slow? |
| Message-ID | <k02ago$2sm$1@smc.vnet.net> |
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]}]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web