integrate tan(x)csch(x)/x^9 from 0.3 to 0.4 then plot the integral in matlab

To integrate tan(x)csch(x)/x^9 from 0.3 to 0.4 numerically in MATLAB, you can use the integral function. First, define the function as a MATLAB function handle:

main.m
f = @(x) tan(x).*csch(x)./x.^9;
32 chars
2 lines

Then, use the integral function to integrate this function from 0.3 to 0.4:

main.m
result = integral(f, 0.3, 0.4);
32 chars
2 lines

The result variable will contain the value of the definite integral.

To plot the integral, you can create a new function handle F that represents the antiderivative of f, and then use the fplot function to plot F over the same interval:

main.m
F = @(x) -1/(8*x^8) + 7/(120*x^6) - 11/(24*x^4) + 1/(2*x^2) + ...
         tan(x).*log(coth(x/2)) - log(x)/8;
fplot(F, [0.3, 0.4]);
132 chars
4 lines

This will plot the antiderivative F of f over the interval [0.3, 0.4].

gistlibby LogSnag