Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'problem integrating' topicStudent Support Forum > General > "problem integrating"

Next Comment >Help | Reply To Topic
Author Comment/Response
Jesse McCrosky
12/27/06 1:47pm

Hi all,

This may be naive, but why does the following not work?

dist[a_, b_] := Sqrt[(a[[1]] - b[[1]])^2 + (a[[2]] - b[[2]])^2]

Integrate[dist[{x, y}, {0.5, 0.5}], {y, 0, 1}, {x, 0, 1}]

I'm tring to integrate the Euclidean distance to the center of a unit square over the entire square. Mathematica 5.2.2 on Mac OS X will complain about division by 0 on the second statement.

Any suggestions? If you need any further information or clarification, please let me know.

Thanks very much.

Jesse McCrosky

URL: ,

Subject (listing for 'problem integrating')
Author Date Posted
problem integrating Jesse McCrosky 12/27/06 1:47pm
Re: problem integrating yehuda ben-s... 12/31/06 03:54am
Next Comment >Help | Reply To Topic