vj wrote:
Quote:
Hi all,
>
I want to solve the two equations
>
u*tan(u)=w
and
u^2 + w^2=V^2, where V is a known constant, and u and w are the two
unknowns to be determined. Please can someone suggest me how to write a
code and solve these equations in C or C++? I am not an expert, but
have elementary working knowledge of C.
You need algebra.
If these are a system then it can easily be solved using math.
If they are not a system the only way to "solve" such equations is to
loop until you get to a certain point close to the answer. It doesn't
look to me like that kind of problem though. Some equations are not
solvable but you know when you get close to your answer and how to
change the variable to get closer. I find this a lot in my job working
on software that makes use of fluid mechanics in calculations.
You can also solve them for input in one of the variables and output
the value of the other. This is also a simple matter of using basic
algebra to solve for a variable.