cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

invalid argument, expecting an arithmetical expression

SOLVED
Highlighted
Newbie

invalid argument, expecting an arithmetical expression

Hi All,

This is what it looks like. I was trying to get the real and imaginary part of a big symbolic expression and got the error. I also attached my file Anyone can help on this? Many thanks in advance!

issue.PNG

Regards,

Mingyu

1 ACCEPTED SOLUTION

Accepted Solutions

Re: invalid argument, expecting an arithmetical expression

Mingyu Yang wrote:

Thanks a lot for the screenshot. Let me tell you more about my goal please. I want to get the symbolic result of the real and imaginary parts in this worksheet and then get another set of real and imaginary parts in another worksheet. These two set of symbolic expression would be equal to each other, therefore I got two equations with two unknowns(Rbot&Ctop). I hope I could solve Rbot & Ctop in this way.........But it seems that the expressions are kinda intimidating......Do you think this is feasible?

So at the end you are only interested in a numeric solution for Rbot and Ctop? Then I guess you should be able to succeed. You won't need any symbolic calculations at all to do so. Get rid of all symbolic evaluations and just leave the functions as you had them defined. I guess you will have similar functions from your second sheet. Merge both sheet into one and take care to avoid identical fuctcion or variable names if yoo don't mean the same.

Then provide guess values for Rbot and Ctop and setup a numeric solve block with your two equations (Re(Vfbl(Rbot,Ctop))=Re(Otherfunction(Rbot,Ctop)), etc.)

Edit: See attached sheet.

View solution in original post

9 REPLIES 9

Re: invalid argument, expecting an arithmetical expression

Your attachment is not a valid Mathcad sheet but a (rather useless as of the missing pictures) html page.

Re: invalid argument, expecting an arithmetical expression

Sorry about that.....What about this one? It should be good.

Thank you.

Re: invalid argument, expecting an arithmetical expression

Mingyu Yang wrote:

Sorry about that.....What about this one? It should be good.

Thank you.

Yes, and apart from a rather long calculation time and a daunting result I experience no problem. I am using Mathcad 15 M030.

I attach a partial screenshot and a pdf printout. But due to the way you had setup your page (page size, margins, portrait mode, overlapping regions, placing regions way over to the right,...) I guess its sure hard to read.

Do you really need the symbolic result?

1.png

Re: invalid argument, expecting an arithmetical expression

Thanks a lot for the screenshot. Let me tell you more about my goal please. I want to get the symbolic result of the real and imaginary parts in this worksheet and then get another set of real and imaginary parts in another worksheet. These two set of symbolic expression would be equal to each other, therefore I got two equations with two unknowns(Rbot&Ctop). I hope I could solve Rbot & Ctop in this way.........But it seems that the expressions are kinda intimidating......Do you think this is feasible?

Thank you,

Mingyu

Re: invalid argument, expecting an arithmetical expression

Note from the screenshots that the symbolic engine can't actually find the real part of the expression. The "Re" function is still there in the result.

I can get the real and imaginary parts using the maple engine in MC13, but the expressions are several pages wide!

What you want to do might be feasible, but why do you not just solve the whole problem numerically?

Re: invalid argument, expecting an arithmetical expression

Mingyu Yang wrote:

Thanks a lot for the screenshot. Let me tell you more about my goal please. I want to get the symbolic result of the real and imaginary parts in this worksheet and then get another set of real and imaginary parts in another worksheet. These two set of symbolic expression would be equal to each other, therefore I got two equations with two unknowns(Rbot&Ctop). I hope I could solve Rbot & Ctop in this way.........But it seems that the expressions are kinda intimidating......Do you think this is feasible?

So at the end you are only interested in a numeric solution for Rbot and Ctop? Then I guess you should be able to succeed. You won't need any symbolic calculations at all to do so. Get rid of all symbolic evaluations and just leave the functions as you had them defined. I guess you will have similar functions from your second sheet. Merge both sheet into one and take care to avoid identical fuctcion or variable names if yoo don't mean the same.

Then provide guess values for Rbot and Ctop and setup a numeric solve block with your two equations (Re(Vfbl(Rbot,Ctop))=Re(Otherfunction(Rbot,Ctop)), etc.)

Edit: See attached sheet.

View solution in original post

Re: invalid argument, expecting an arithmetical expression

Great answer! Many thanks for helping me out!

Re: invalid argument, expecting an arithmetical expression

Please let me ask one more question......When I use this guess&find approach, it seems that if I fail to provide a close enough guess value, it will give me error, right? Is this the nature of Mathcad?Capture.PNG

Re: invalid argument, expecting an arithmetical expression

It is the nature of all numerical non-linear solvers. They find the solution by iteration. If you are too far off when they start then they may just give up trying to find a solution, or in some cases they may find the wrong solution.

You should also be careful about those numbers you have on the rhs. It depends on the nature of the problem, but only 4 decimal places may not be enough. If you actually have expressions for the rhs in another worksheet the best thing to do would be to merge the two sheets, and put the expressions on the rhs.

Announcements