Message Boards Message Boards


Is the output correct using NSolve command

Posted 8 years ago
1 Reply
0 Total Likes

Ok I am using the NSolve command to solve both eqautions simultaneously. However I do not think my ouyt put is correct. Is my input incorrect? heres my two equations

yEqn = f[s] + d == g[s]
slopeEqn = 2 s == Cos[s]

heres my input for NSolve

NSolve[{yEqn, slopeEqn}, {s, d}, Reals]
{{s -> 0.450184, d -> 0.232466}}

I think my output is wrong.

POSTED BY: steve c

The universal answer to your question is:

"Plug the values back into the equations and see if they make sense"

What happens when you plug the values back into your equations? take slopeEqn for example:



The values are very close. Since you're using NSolve, you'll only get approximately correct answers because of the nature of floating point numbers.

You haven't defined "f" or "g" for us, so there's nothing I can say about the first equation.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract