Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13927 > unrolled thread
| Started by | Joao <joaopereira9@gmail.com> |
|---|---|
| First post | 2013-03-25 03:23 +0000 |
| Last post | 2013-03-30 08:07 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Recursive function: What is the proper way to get mathematica to Joao <joaopereira9@gmail.com> - 2013-03-25 03:23 +0000
Re: Recursive function: What is the proper way to get mathematica to debguy <johnandsara2@cox.net> - 2013-03-30 08:07 +0000
| From | Joao <joaopereira9@gmail.com> |
|---|---|
| Date | 2013-03-25 03:23 +0000 |
| Subject | Recursive function: What is the proper way to get mathematica to |
| Message-ID | <kiog04$3cb$1@smc.vnet.net> |
Hi there
I would appreciate if someone could guide me in this issue. I have a fairly complicated function that is an integral whose integrand contains the initial function. I was trying to write it (pencil and paper) as a recurrence expression, but is not easy. I am also experimenting with some of mathematica's built in commands but nothing has worked so far....most probably because I am not doing it correctly.
The function is:
x[i_, t_] :=
q*Power[Integrate[
Exp[-(r + \[Delta]) (s - t)] Power[
Integrate[(b + X[j, s])^\[Alpha] - b^\[Alpha], {j, 0,
A}], (1 - \[Alpha])/\[Alpha]]*(b + X[i, s])^(\[Alpha] -
1), {s, t, Infinity}], 1/(\[Phi] - 1)];
And:
X[i_, t1_] := (X[i, t] +
Integrate[
Exp[\[Delta] (s - t)] x[i, s], {s, t, t1}]) Exp[-\[Delta] (t1 -
t)];
Basically, X[i_,t1_] is the integration of a differential equation of x[i_,t_]
x[i_,t_] is a flow and X[i_,t1_] the stock.
The goal of all this is to get a nicer expression for x[i,t], which I believe is possible.
The domains for the parameters are:
q > 0; \[Alpha] > 0 && \[Alpha] < 1; b > 0;
r > 0 && r < 1; \[Delta] > 0 && \[Delta] < 1; \[Phi] > 1; A > 0; X[i,t]>0;
My question is: which Mathematica function should I try for this?
Thanks in advance
Joao
[toc] | [next] | [standalone]
| From | debguy <johnandsara2@cox.net> |
|---|---|
| Date | 2013-03-30 08:07 +0000 |
| Message-ID | <kj66fg$oh3$1@smc.vnet.net> |
| In reply to | #13927 |
Most importantly you need to first ask: when can I use Number Integration and when must the result of Integration be symbolic in order to procede with counting? Let's evaluate that by hand. Being Integrate I'm Taking Parts of eq'n and expect to yeild a new equation (or number). (the Mathematica Book, Principles of Evaluation) When I integrate X[i,t] you tell me evaluate X[i,t] to find what to integrate (the Parts). I try but the result is always the same: I'm asked to find X[i,t] again (has not changed). may as well say: y[x_]:=y[x] Also, possibly erroneously in your setup, what is independant or dependant to integrate changes depending upon whether X[i j,t] or x[i j,t] is invoked first. I don't think you want recursion. If you intend to code recursivly you need a condition of exit. See www.wikipedia.com for lessions about recursion and exit as the Mathematica Book does not explain, ie tail recursion, well. If you intend to recurse during an integral evaluation you need to continually evaluate and Integrate does not do that, so maybe Sum[] or For loop is a better way to begin if you have non-instantaneous variables / functions to evaluate at each partition of sum. (possible NIntegrate with special objects). You might even plot what is being summed while it is. Most importantly you need to first ask: when can I use Number Integration and when must the evaluation be symbolic. When can I state the symbol definition of the equation , and when can i substitute in it.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web