HOW TO SOLVE THIS INTEGRATION?

I HAVE WRITTEN CODE LIKE THIS
%basic function
function=P(h-y)+T.*exp(-k.*y);
%Apply squareroot
f_1=sqrt(function);
int=integral(f_1 );
BUT I HAVE FACING PROBLEM PLS HELP ME

1 Comment

Please do not close questions that have an Answer.

Sign in to comment.

 Accepted Answer

P = 2.0;
h = 1.0;
T = 3.0;
k = 0.01;
fun = @(y)sqrt(P*(h-y)+T*exp(-k*y));
ylow = 0.0;
yhigh = 1.0;
sol = integral(fun,ylow,yhigh)

More Answers (0)

Categories

Find more on Numerical Integration and Differential Equations in Help Center and File Exchange

Asked:

on 24 Oct 2018

Edited:

on 25 Oct 2018

Community Treasure Hunt

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

Start Hunting!