Hi Team,
I'm brand new user of Mathcad Prime 4.0.
Trying to solve simple equation by iteration. What is the easiest way to solve this attached equation.
Idea behind is to change or increase k1 until left and right side are equal or at least close to each other (let's say error of 0.01). Everything else is a constant.
Thank you in advance
Solved! Go to Solution.
@AdoS wrote:
Hi Team,
I'm brand new user of Mathcad Prime 4.0.
Welcome to Mathcad! Learn about solve blocks:
@AdoS wrote:
Hi Team,
I'm brand new user of Mathcad Prime 4.0.
Trying to solve simple equation
What is it an unknown?
Hi,
thank you for the reply.
k1 is the unkown.
Hi,
I've made extract with this detail. I see you have done same as me with solve k1. Not sure is this correct procedure, but could also be that it is not possible due to small left side?
Regards
@AdoS wrote:
Looks like there might be somethign with units :S
You are absolutely right - its the units.
The symbolics in Prime (a old version of a program called muPad) does not know anything about units and treats them as unknown variables. It also does not know anything about predefined constants like g.
Sometimes it helps to redefine the constants used and use something like "substitute, hr=3600s" and "assume, m>0", etc. But in case of your function this seems not to help.
Anyway, Fred already revealed the solution. The task is exactly what a solve block was made for. It will do the iterations you were talking about (it will use a more sophisticated algorithm, though) and as a numeric method it works well with units, too.
And alternative (I would stay with the solve block, though) is the use of the "root" function. You may use it in two different ways - either provide a range or a guess. The accuracy of root depends on the value of the system variable TOL. You should set it at least to 10^-8 or lower (default is 10^-3) to get the same accuracy as with the solve block.
Fred, Werner,
Thank you both, this works perfect. I've tried solved block as one of the first options (after searching thru this page) but it did not worked (now I know it is units, this with 1/m works perfect).
Now can continue my little spreadsheet 🙂
Cheers
@AdoS wrote:
Fred, Werner,
Thank you both, this works perfect. I've tried solved block as one of the first options (after searching thru this page) but it did not worked (now I know it is units, this with 1/m works perfect).
Yes, the guess value must be specified with the correct unit.
Only exception is if you use "k.1:=Zero" (note the capital Z). Zero is compatible with any units. The solve block works OK and returns the correct value, but without any unit - in my opinion this is a bug!
@AdoS wrote:
Hi Team,
I'm brand new user of Mathcad Prime 4.0.
Welcome to Mathcad! Learn about solve blocks: