22 views (last 30 days)

Show older comments

Dear all,

I'm trying to solve an integral using both matlab and mupad. However it does not solve the integral although it is definite. It basically just simplifies the expression and returns something like

(int((Ub-Ui(i)+cos((pi*x*2.0)/L)*((pi*Xi(i+1.0)*cosh((H*pi*cos((pi*x*2.0)/L))/L)*2.0)/L+(pi*Yi(i+1.0)*sinh((H*pi*cos((pi*x*2.0)/L))/L)*2.0)/L)-cos((pi*x*2.0)/L)*((pi*Xi(1.0)*cosh((H*pi*cos((pi*x*2.0)/L))/L)*2.0)/L+(pi*Yi(1.0)*sinh((H*pi*cos((pi*x*2.0)/L))/L)*2.0)/L)+((di(i)+H*cos((pi*x*2.0)/L)*(1.0/2.0))*(Ui(i+1.0)-Ui(i)))/(di(i+1.0)-di(i))-((Ub-Ui(1.0))*(d+H*cos((pi*x*2.0)/L)*(1.0/2.0)))/(d-di(1.0)))^2,x,0.0,L*(1.0/2.0))*2.0)/L;

Does anybody know how to 'force' Matlab/Mupad to give a solution?

Kind regards,

Bruno Pop-Stefanov
on 10 Oct 2014

If you want to "force" MATLAB to give a numeric solution to an integral, you can use the integral function, which computes the integral numerically, as opposed to int and MuPAD, which try to solve the integral symbolically.

Here is a page with the list of numerical integration functions and links to examples:

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!