Group Abstract Group Abstract

Message Boards Message Boards

Error in numerically solving a system of equations

Posted 3 years ago

Hello, I am having difficulties solving a system of equations with the NSolve Function in Mathematica. I have four sets of equations and attempted to combine several into one equation to enhance the ability to solve the problem, but it did not work. Here are much simplified versions of the equations I used as well as the formatting I used for NSolve. Is there a limit to the amount of equations I can use? Is there a better command I can use to solve this problem I want the value of x:

Simplified Equations
eq.1) 1=(1/n)(g/4)exp(g/4)
eq.2) n=(4/3)pir^2
eq.3) r=2x^3
eq.4) g=3/4x^3
For simplification, we can assume "eq.y" is a fully written out version of one of the above equations and all equalities have a "==" rather than just "="
Formatting*

NSolve[{eq.1,eq.2,eq.3,eq.4},x]
POSTED BY: Avery Ansbro
4 Replies
Posted 3 years ago

Avery,

Please learn how to format code in posts, read the post editor and code formatting sections here.

There are several syntax errors in the equations e.g. Exp[g/4], not exp(g/4), Pi, not pi, ..., read this.

POSTED BY: Rohit Namjoshi
POSTED BY: Daniel Lichtblau
Posted 3 years ago

The "eg.1" in the quoted piece was purely so I didn't have to re-write out the equations/to make my question more legible. In Mathematica, what I placed there in my input are just the equations, not the "eq.y" notation.

Which aspect of the formatting is off, the notation style for NSolve or the equations themselves?

POSTED BY: Avery Ansbro
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard