Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11301
| From | W Craig Carter <ccarter@MIT.EDU> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Nested numerical integral - speed: Is it suppose to be so slow? |
| Date | 2012-08-10 06:42 +0000 |
| Message-ID | <k02ago$2sm$1@smc.vnet.net> (permalink) |
| References | <20120809075343.71F12664F@smc.vnet.net> |
| Organization | Time-Warner Telecom |
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 comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Nested numerical integral - speed: Is it suppose to be so slow? W Craig Carter <ccarter@MIT.EDU> - 2012-08-10 06:42 +0000
csiph-web