问题描述:

I have a task to solve equation system with `FindRoot`

:

`a*x+b*y^2-c*x^2=a-b`

, `a*x^2+b*y^2+b*x-cy=b+c`

, where a = 10, b = 10, c = 6;

I'm very(!) new to Mathematica and have one day to get to know it.

Any comments on how to solve that equation will be much appreciated!

Thanks!

This starts searching for root at `x = 0`

and `y = 0`

```
eq = {a*x + b*y^2 - c*x^2 == a - b, a*x^2 + b*y^2 + b*x - c*y == b + c}
param = {a -> 10, b -> 10, c -> 6}
result = FindRoot[eq /. param, {x, 0}, {y, 0}]
```

This only gives you 1 of the two Real solutions. `Solve`

will give you both (and even some solutions with Complex numbers). To test it:

```
eq /. param /. result
```

This returns `(True, True)`

so you know you've found the correct root.

To find the solution graphically, use `ContourPlot`

:

```
ContourPlot[Evaluate[eq /. param], {x, -5, 5}, {y, -5, 5}]
```

Here is the version with Solve/NSolve

```
NSolve[{a*x + b*y^2 - c*x^2 == a - b,
a*x^2 + b*y^2 + b*x - c*y == b + c} /. {a -> 10, b -> 10, c -> 6},
{x, y}]
```

It will give the 4 solutions. If you use Solve instead of NSolve you will have a (large) closed form of each component of each solution.

If you need more digits for the solution, add at the end of the NSolve command the option `WorkingPrecision->30`

(or any other number of digits. These are quadratics, they can computed to any precision necessary).

您可能感兴趣的文章：

- fasta - Search and import multiple words from txt file on Biopython
- ios - Create 2 RSS Readers in Xcode
- java - Serve an already-gzipped response from a Servlet
- database - AS3 SQLite DELETE statement don't give result
- I2C Sensor Arduino outputs 0s?
- php - Reading a specific line from a text file
- clr - Any implementation of an Unrolled Linked List in C#?
- Finding Hudson Log Files
- Forward to a payment-gateway together with POST data using cURL (or any other PHP server side solution)
- WCF in Winforms app - is it always single-threaded?

随机阅读：

**推荐内容**-

**热点内容**-
- php - Reading a specific line from a text file
- clr - Any implementation of an Unrolled Linked List in C#?
- Finding Hudson Log Files
- Forward to a payment-gateway together with POST data using cURL (or any other PHP server side solution)
- WCF in Winforms app - is it always single-threaded?
- git svn - git svn fetch does not fetch a Subversion commit message modified after initial clone
- java me - Why I am getting the bad length exception when I am running this application?
- java - How to get string.format to complain at compile time
- ruby on rails - Trigger observer of parent class on change
- python - Issue with URL pattern in Django with webmonkey tutorial