 #1
 35
 0
“Nonintegrable” multiple integrals for Mathematica
Dear all,
I have been trying to crack one problem in Mathematica, but I keep getting a wrong answer probably because I have something either fundamentally wrong analytically or code wise. OK, here is the problem.
Suppose we have to evaluate the following:
Integral from 0 to t, dm [of Integral from m to t, dd [of Integral from d to b of (yd), dy],
and suppose we know that b = 3. Clearly, it is straightforward to accomplish this task (please see the first 3 steps in the code attached (Example2.nb files) and the “final” answer). (I deliberately proceeded in simple steps to keep a better track of the individual answers).
Suppose also I know that t is a time variable which varies from, say, 0 to 2. Then I can easily take various values of t from that interval, plug them into the “final” answer and plot if I need to. (Step size 0.01 would be precise enough for my purpose).
However, suppose we want to plot the “final” for "all" possible values of t, without being able to analytically integrate the first inner integral, i.e. “Integral from d to b of (yd), dy”. Let us just pretend that the reason is that this thing is “nonintegrable”.
I have performed a sequence of simple steps to get to the “finalnew”, but you can see that this is a wrong array, because if I set t=0.01, for example, in “final” I would get 0.000224001, which is not what the 2nd element in “finalnew” array is.
I would really appreciate if you could help. This is for my research, where the primary problem is that in place of (yd) I have something prettycomplicated, which is “nonintegrable”. I can numerically integrate it given that d was a dummy for t which goes from 0 to 2 as you recall. But then the question is, given 2 remaining integrals, how to build a final array of numbers to plot. All I need is the final array of right numbers. I am sure there is a correct and perhaps an easier way to accomplish this task, but the question is what it is.
Thanks a lot for your time.
Anna.

Dear all,
I have been trying to crack one problem in Mathematica, but I keep getting a wrong answer probably because I have something either fundamentally wrong analytically or code wise. OK, here is the problem.
Suppose we have to evaluate the following:
Integral from 0 to t, dm [of Integral from m to t, dd [of Integral from d to b of (yd), dy],
and suppose we know that b = 3. Clearly, it is straightforward to accomplish this task (please see the first 3 steps in the code attached (Example2.nb files) and the “final” answer). (I deliberately proceeded in simple steps to keep a better track of the individual answers).
Suppose also I know that t is a time variable which varies from, say, 0 to 2. Then I can easily take various values of t from that interval, plug them into the “final” answer and plot if I need to. (Step size 0.01 would be precise enough for my purpose).
However, suppose we want to plot the “final” for "all" possible values of t, without being able to analytically integrate the first inner integral, i.e. “Integral from d to b of (yd), dy”. Let us just pretend that the reason is that this thing is “nonintegrable”.
I have performed a sequence of simple steps to get to the “finalnew”, but you can see that this is a wrong array, because if I set t=0.01, for example, in “final” I would get 0.000224001, which is not what the 2nd element in “finalnew” array is.
I would really appreciate if you could help. This is for my research, where the primary problem is that in place of (yd) I have something prettycomplicated, which is “nonintegrable”. I can numerically integrate it given that d was a dummy for t which goes from 0 to 2 as you recall. But then the question is, given 2 remaining integrals, how to build a final array of numbers to plot. All I need is the final array of right numbers. I am sure there is a correct and perhaps an easier way to accomplish this task, but the question is what it is.
Thanks a lot for your time.
Anna.

Attachments

11.6 KB Views: 368