×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

new, need help with integration

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

RE: new, need help with integration

Yes, but the array would be 11 not 10.

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources