Which version and maintenance release of Mathcad are you using?
Maybe the problem is due to a bug in an older version which already is fixed?
Do you get the error already in the last line of your sheet when you just define the function r or when you try to evaluate it via r(10)=
I also experience no problem in evaluating your function r (Mathcad 15, M045).
When calculating your various coefficients a(i), b(i), etc. every call evaluates the solve blocks again and again. This could be speeded up significantly by creating a function which calls the solve blocks just once and then calculates and returns ALL of the necessary coefficients in a vector.
Doing so would be quite some work in rewriting the sheet but probably worth the time spent.
Her a small example - the function I1(i): Your version of this function calls the solve block for f three times while the version below calls it only once (and we don't need the function x1(i) and x2(i) you defined above anymore):

using this new function I1 and a similar one for I2 already cuts the time to calculate r to one third and the whole sheet could be speeded up much, much more, I guess.
Nevertheless you experience that strange error. So lets try some changes (I am just poking around in the dark):
What do you get when you evaluate B(10)=? Do you get

If yes, try to reformulate your function r

Do you get the result or do you still experience that error?
Welcome to the PTC Community
No account yet? Create an account
Please use your PTC eSupport account.
LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

