Message Boards Message Boards

0
|
1705 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Is the output correct using NSolve command

Posted 10 years ago

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:

2*0.450184  
0.900368

Cos[0.450184]
0.900367

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
Attachments
Remove
or Discard

Group Abstract Group Abstract