Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5608 > unrolled thread
| Started by | Patrick Scheibe <pscheibe@trm.uni-leipzig.de> |
|---|---|
| First post | 2011-10-12 07:47 +0000 |
| Last post | 2011-10-12 07:47 +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: Making a function out of repeated hyperbola integrations? Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2011-10-12 07:47 +0000
| From | Patrick Scheibe <pscheibe@trm.uni-leipzig.de> |
|---|---|
| Date | 2011-10-12 07:47 +0000 |
| Subject | Re: Making a function out of repeated hyperbola integrations? |
| Message-ID | <j73gls$fun$1@smc.vnet.net> |
Hi,
with the starting value n-a everything you have to do is to
iterate the the following two steps again and again
1. replacing n->n/x
2. integrating
and that is as simple as it sounds:
NestList[Function[
Integrate[# /. n -> n/x, {x, a, n/a},
GenerateConditions -> False]],
n - a, 4]
If you want the first starting element dropped, use Rest on the resulting
list.
Cheers
Patrick
On Oct 11, 2011, at 10:24 AM, Nathan McKenzie wrote:
> I'm working with the following repeated integrals. Is there any way
> to automate what I'm doing here?
>
> I start with this:
>
> Integrate[ n/x - a, {x, a, n/a}]
>
> The result of that (after a bit of text editing) is a^2 - n Log[a] + n
> (-1 + Log[n/a]). That's the first result I want to work with. Then, I
> currently manually edit that result by swapping out n with (n/x), and
> have
>
> Integrate[ a^2 - (n/x) Log[a] + (n/x) (-1 + Log[(n/x)/a]), {x, a, n/
> a}]
>
> And that resolves to -a^3 + n Log[a] + n Log[a]^2 + 1/2 n Log[n/a^2]^2
> + n (a - (1 + Log[a]) Log[n/a]). Which is the second result I want
> to work with. The, I manually swap out n with (n/x) and integrate
> again on {x, a, n/a}, and repeat this process ad nauseum. It doesn't
> take long before the number of n's for me to edit becomes really
> unwieldy and error prone... and ideally I would like to do this many
> times in a row (say, up 30 or 40) and have the results around for
> random use in other contexts.
>
> What I would really like to be able to do is just have some sort of
> function where I can type F[n,a,s], where s is the number of times
> integration is performed, and then n and a (which will be actual
> numbers) will get evaluated. I feel like the step where I swap out n
> with (n/x) points at something problematic, though. Is there any way
> in Mathematica for me to construct such a function and get my results
> automatically?
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web