Numerically solve of integral equation with known Integrand
Show older comments
I'm trying to solve the attached integral equation (Eq. 5), numerically. The value of particle acceleration
and fluid acceleration
are known up to the time step n where t = n
and the integral is from time 0 to t. I'm currently using the basic definition of integral to solve it (namely, Eq. 4).
The integral can be evaluated numerically except at a region where τ is approaching t. There, the integrand becomes infinite and needs to be treated separately. Therefore, I split the integral into two terms: Z1 and Z2 where Z1 is the series term expressed in Eq. 5 and Z2 is the last term in Eq. 5. Here is the code that I wrote:
if n > 2
Z1= 0;
for m = 2:n-1
Z1 = Z1+ ((d2z_p(n-m) - d2z_f(n-m))/sqrt(m)) * dt^(1/2)
end
Z2 = (d2z_p(n-1) - d2z_f(n-1)) * dt^(1/2);
Z_1 = Z1 + Z2;
end
Z_1 is supposed to be the solution of the integral, but I know that it doesn't give the right answer either because Eq. 4 is not the right one to use, or my code is wrong. Anyone can help me on how to solve the given integral?
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!