# Solving for multiple unknown variables

Assume for this scenario that:

`a = b * c`

`d = b - c`

I only know the value for `a` and `d` (in this case 0.075 and 239, respectively), and I need to solve for both `b` and `c`. Is this possible to solve given the limited information, and if so what is the best approach to do so?

-

## 3 Answers

This is known as a system of nonlinear simultaneous equations. In this case, it is very easy to solve the system.

First, write $b$ in terms of $d$ and $c$, where $d$ is known:

$$b = d+c.$$

Substitute this into the first equation:

$$a = bc = (d+c)c = cd+c^2$$

Solve this for $c$ using the quadratic formula:

$$c^2+dc-a = 0 \implies c = -\frac{d}{2}\pm \frac{\sqrt{d^2+4a}}{2}$$

Substitute the solutions back into the equation $b = d+c$ to find values of $b$.

-

The problem I am running into is, after solving the quadratic equation I get the results `-0.00031` and `-239` and I know neither of those to be possible values. Even as positive values, neither of them make sense given the real world number I am trying to solve for. Any idea as to why this would be? – Moses Oct 29 '12 at 19:28
I do not know, because I do not have the context of the problem. All I know is that there are finitely many possible solutions given the input data. – Arkamis Oct 29 '12 at 19:32
My apologies, you were correct in your approach and I was incorrect in my assumptions. Once I adjusted my assumptions your approach produced correct results. Thanks. – Moses Oct 29 '12 at 23:03

Yes, there is a solution. I recommend checking the exact form (not approximate) as provided by wolfram alpha.

Solution

This supports Ed's answer

-

Very cool, I did not know wolfram alpha was capable of that kind of analysis. I'll be going back there next time I find myself sans graphic calculator! – Moses Oct 29 '12 at 23:05

Rewrite your two equations: $$\begin{cases} .075 = b\times c \\ 239 = b-c \end{cases}$$ Now solve the second equation for $b$ so that $b=239+c$. Plug this into the first equation in place of $b$: $$.075 = (239+c)\times c$$ Do you know how to solve quadratic equations? Once you have the possible values of $c$, plug those back into our equation for $b$ to get the final answer. This method is called eliminating a variable by substitution.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 12, "mathjax_display_tex": 5, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9441354870796204, "perplexity_flag": "head"}