Skip to main content
1-Visitor
August 21, 2013
Solved

Basic integration problem

  • August 21, 2013
  • 1 reply
  • 4741 views

I'm pretty new to MathCad and trying to integrate, however my integration is not converging. The problem seems to be in the sigma calculation since when I remove it from the second equation the calculation converges. The calc is listed below. z is defined as a vector from 5 to 50 ft and calculated every foot. Thank you very much!

Picture1.png

Best answer by Werner_E

Tha wasn't a good idea. Using a vector as input was OK. Its dangerous to mix up rangevariables and vectors. Range variable are good for three kind of things only: use them to index vectors & matrices, in programs in for-loops, in 2D-plots. Thats all. Don't confuse them with vectors just because they may look alike.

Look at the attached sheet if it would help. I set up the function to take a single scalar as parameter, but I am still unsure as of the integral. You can't take the parameter of the function as variable of integration.

1 reply

25-Diamond I
August 21, 2013

For questions of that kind its much mire useful if you post the worksheet. You can do this by chosing "Use advanced editor" at the upper left.

I am confused as of you variabl for integration - z. Chose another name, as z is the parameter of the function Q' and a constant vector as you wrote. Used the way you did it, sigma is called in the integral with a scalar (which has nothing to do with the vector z) and this will make sigma fail, I guess.

It seems to be easier if you setup your functions to deal with a single scalar value and then call it with the vector using vectorizing.

1-Visitor
August 21, 2013

Im trying to figure out how to post the entire worksheet. may take a second

1-Visitor
August 21, 2013

okay here it is. Thanks a bunch. The RangeVec function on the upper right hand of the worksheet is something that another student put together and has been used previously and worked just fine. I just have never run an integration in MathCad before.