@Nittany Discord
L’Hospital would be my first try too. But if we look at this problem differently and if we try to minimise our steps, maybe the shown way is faster. So I think to differentiate could cost some FLOPs. I’m not an expert at numerical analysis yet, so I could be wrong.
@Cloudsdale
I’m not sure if you can get a situation where I(x) = f(x) + AI(x) with integration by parts because you’d always get f(x) = 0 and A = 1. Otherwise, you’d get something like I(x) = f_n(x) + A_nI_n(x), and then you’d continuously iterate to get an infinite series expansion if possible.
I guess to get I(x) = f(x)/(1 - A) from integration by parts, you’d have to find an integral that would take the form I(x) = f(x) + AI(x) after being put through the formula. Would be a nice exercise to prove if there is a non-trivial function g(x) = u(x)v(x) who’s integral I(x) = int[g(x)] dx produces the form I(x) = f(x)/(1 - A) when put through the integration by parts formula int[u(x)v’(x)] dx = u(x)v(x) - int[v(x)u’(x)] dx.
@Nittany Discord
That actually wouldn’t be that bad, providing that the new undeterminate form is somewhat “proportional” to the previous one. Because then you have a recursion relation in hand, and you can solve for it ;) Kinda similar to when you’re solving an integral by parts and you get something + the same integral you began with (let’s call it “I”). Then you can replace its occurrence with “I” and get the recursive formula I = somethng + constant·I, so you subtract it from both sides to get I – constant·I = something, or (1–constant)·I = something, and finally I = something / (1–constant) and you have solved for the integral :) Keep this trick in mind anytime you deal with recursive formulas like these ;)
L’Hospital would be my first try too. But if we look at this problem differently and if we try to minimise our steps, maybe the shown way is faster. So I think to differentiate could cost some FLOPs. I’m not an expert at numerical analysis yet, so I could be wrong.
I’m not sure if you can get a situation where I(x) = f(x) + AI(x) with integration by parts because you’d always get f(x) = 0 and A = 1. Otherwise, you’d get something like I(x) = f_n(x) + A_nI_n(x), and then you’d continuously iterate to get an infinite series expansion if possible.
I guess to get I(x) = f(x)/(1 - A) from integration by parts, you’d have to find an integral that would take the form I(x) = f(x) + AI(x) after being put through the formula. Would be a nice exercise to prove if there is a non-trivial function g(x) = u(x)v(x) who’s integral I(x) = int[g(x)] dx produces the form I(x) = f(x)/(1 - A) when put through the integration by parts formula int[u(x)v’(x)] dx = u(x)v(x) - int[v(x)u’(x)] dx.
That actually wouldn’t be that bad, providing that the new undeterminate form is somewhat “proportional” to the previous one. Because then you have a recursion relation in hand, and you can solve for it ;) Kinda similar to when you’re solving an integral by parts and you get something + the same integral you began with (let’s call it “I”). Then you can replace its occurrence with “I” and get the recursive formula
I = somethng + constant·I
, so you subtract it from both sides to getI – constant·I = something
, or(1–constant)·I = something
, and finallyI = something / (1–constant)
and you have solved for the integral :) Keep this trick in mind anytime you deal with recursive formulas like these ;)Edited because: minor
I also wonder if you’d just get indeterminate forms no matter how many times you used the rule.