To integrate tan(x)ln(x)csch(x) from 0 to 1 in MATLAB, we can use the symbolic math toolbox. First, define the function using the sym command and create a symbolic variable x:
main.m35 chars3 lines
Next, use the int command to compute the indefinite integral of f:
main.m15 chars2 lines
Then, use the subs command to evaluate the value of F at limits 0 and 1:
main.m55 chars2 lines
Here, result will be the definite integral of f from 0 to 1. Note that we use the double command to convert the symbolic output to a numerical value.
gistlibby LogSnag