new, need help with integration
new, need help with integration
(OP)
Hi,
I need to evaluate the following integral:
f(x) = (2/pi)*int('(y^2)/sqrt(y^2-x^2)','y',x,1) as 0<x<1
If I have x, incremented by 0.1 from 0 to 1 in a 1x10 matrix, is there a way I could create an array which will contain the integral above solved using all of the values for x in the array?
Thanks in advance
I need to evaluate the following integral:
f(x) = (2/pi)*int('(y^2)/sqrt(y^2-x^2)','y',x,1) as 0<x<1
If I have x, incremented by 0.1 from 0 to 1 in a 1x10 matrix, is there a way I could create an array which will contain the integral above solved using all of the values for x in the array?
Thanks in advance





RE: new, need help with integration
syms x1 x2
A = [ x1; x2 ] % A horrible way to prime the pump, anyone have a better cleaner way?
x = 0 : 0.1 : 1;
nX = length( x );
for iX = 1 : nX;
A( iX )=(2/pi)*int('(y^2)/sqrt(y^2-x^2)','y',x( iX ),1)
end