View Full Version : Numerical Integration Help!
MarxSchmarx
23rd July 2009, 06:04
OK, suppose I have a function x(t) and I can calculate the values of x(t) at any value of t. So I can calculate the integral from t=t1 to t=t2, which I'll denote Integral_{t1->t2} x(t) dt
Now suppose T is some constant, positive number.
Does anybody know how I can calculate Integral_{t1->t2} x(t)/(x(t-T)) dt ??? It seemed like a pretty easy problem until I actually sat down and tried to implement it.
Kwisatz Haderach
23rd July 2009, 13:30
You mean you want a general formula for calculating Integral_{t1->t2} x(t)/(x(t-T)) dt regardless of what the explicit form of function x(t) actually is? I'm not sure there is one. It seems to me that you can only solve this problem by using some special properties of the function x(t).
For example, if the function has the property that x(a+b) = x(a) + x(b), then x(t-T) = x(t) + x(-T), so your integral becomes:
Integral_{t1->t2} x(t)/(x(t) + x(-T)) dt = Integral_{t1->t2} 1 - x(-T)/(x(t) + x(-T)) dt
where x(-T) is a constant, so if we denote it by C, you have the relatively simple form:
Integral_{t1->t2} 1 - C/(x(t) + C) dt
But that's only if the function x is such that x(a+b) = x(a) + x(b). To generalize, you could use a similar method to solve this problem as long as you know that x(a+b) is some function - any function - of x(a) and x(b). But if you don't have that information, then I don't know.
MarxSchmarx
24th July 2009, 04:32
You mean you want a general formula for calculating Integral_{t1->t2} x(t)/(x(t-T)) dt regardless of what the explicit form of function x(t) actually is? I'm not sure there is one. It seems to me that you can only solve this problem by using some special properties of the function x(t).
For example, if the function has the property that x(a+b) = x(a) + x(b), then x(t-T) = x(t) + x(-T), so your integral becomes:
Integral_{t1->t2} x(t)/(x(t) + x(-T)) dt = Integral_{t1->t2} 1 - x(-T)/(x(t) + x(-T)) dt
where x(-T) is a constant, so if we denote it by C, you have the relatively simple form:
Integral_{t1->t2} 1 - C/(x(t) + C) dt
But that's only if the function x is such that x(a+b) = x(a) + x(b). To generalize, you could use a similar method to solve this problem as long as you know that x(a+b) is some function - any function - of x(a) and x(b). But if you don't have that information, then I don't know.
Yeah, I've given up on the ability to get a general solution. At this point I think if I can find some program that will numerically integrate Integral_{t1->t2} x(t)/(x(t-T)) dt I will be quite content, where x(t) is measurable. I couldn't get this to work in Mathematica, so it seems the answer may be non-trivial.
Powered by vBulletin® Version 4.2.5 Copyright © 2020 vBulletin Solutions Inc. All rights reserved.