I would like to ask how to calculate the R1 and R2 in the following circuit.

I have equations

$$V_{out} = (I_1 + I_2) \times R2 + I_2 \times 10k\Omega$$

$$I_2 = \frac {2.5-V_{out}} {R_1}$$

which gives

$$V_{out} = \frac { 2.5(R_2 + 10k\Omega) + I_1 \times R_1 \times R_2 } { R_1+R_2+10k\Omega}$$

I further know that \$I_1\$ = 0A & \$V_{out}\$ = 0.1V.

When I try to solve for R1 and R2, I get a quadratic equation, which is weird, since the circuit is completely linear.

The correct values should be 78.125 Ohm for R2 and 241875 Ohm for R1, so I know the numerical solution, I just find it weird that this leads me to a quadratic equation.

Could somebody point out my error? Thank you.

enter image description here

  • 3
    \$\begingroup\$ Many linear circuit solutions involve a quadratic equation. It does not make them non-linear. \$\endgroup\$
    – Andy aka
    Mar 6, 2023 at 11:20
  • \$\begingroup\$ Linearity is about the relationship between input and output, specifically that the output is proportional to the input. This proportionality is what enables all the useful properties of linear systems. It does not imply that all equations related to the system are perfectly linear, so it is ok that if you want to solve for something (other than the output) and get a nonlinear equation. \$\endgroup\$ Mar 6, 2023 at 13:53

3 Answers 3


In that single equation for \$V_{OUT}\$, there are four unknowns: \$R_1\$, \$R_2\$, \$V_{OUT}\$ and \$I_1\$. This means that you need four independent equations, to solve for any of them, which you don't have, yet.

Since your intention is to solve for \$R_1\$ and \$R_2\$, you must obtain two independent equations in \$R_1\$ and \$R_2\$ only, which can be obtained by substituting known values for \$V_{OUT}\$ and \$I_1\$.

One pair of values is already known. When \$I_1=0A\$, then \$V_{OUT}=100mV\$. By plugging those into the equation, you will have one of the two necessary equations in \$R_1\$ and \$R_2\$.

However, you will also need another value for \$I_1\$, and the corresponding \$V_{OUT}\$, to obtain the second equation, which you have not specified. Only then will you have the two equations, with two unknowns, that can be solved.

The schematic you provided does actually give you two pairs of values. The first pair would be \$I_1 = 0.4mA\$ and \$V_{OUT} = 0.4V\$. The second pair is \$I_1 = 20mA\$ and \$V_{OUT} = 1.6V\$.

Using your equation, this yields:

$$ \begin{aligned} 0.4 &= \frac{2.5(R_2+10k)+4m \times R_1 \times R_2 }{R_1+R_2+10k\Omega} \\ \\ 1.6 &= \frac{2.5(R_2+10k)+20m \times R_1 \times R_2 }{R_1+R_2+10k\Omega} \\ \\ \end{aligned} $$

These I rearranged by multiplying both sides by \$R_1+R_2+10k\Omega \$, and expanding:

$$ \begin{aligned} 0.4R_1+0.4R_2+4000 &= 4\times 10^{-3}R_1R_2 + 2.5R_2 + 25000 \\ \\ 1.6R_1+1.6R_2+16000 &= 20\times 10^{-3}R_1R_2 + 2.5R_2 + 25000 \\ \\ \end{aligned} $$

To eliminate the \$R_1R_2\$ term I multiplied all the terms in the first by 5, and subtracted corresponding terms from the second, to get:

$$ \begin{aligned} 0.4R_1+0.4R_2+4000 &= 10R_2 + 100000 \\ \\ \end{aligned} $$

This can be manipulated to get \$R_1\$ purely in terms of \$R_2\$ (or vice versa), which you can then substitute back into a previous equation, to solve. I did indeed find a quadratic equation, which gave me two solutions:

$$ \begin{aligned} R_2 &= 78.125 \text{ or } -10000 \\ \\ R_1 &= 241875 \text{ or } 0 \\ \\ \end{aligned} $$

Whatever technique you use to solve them can involve a quadratic expression in \$R_1\$ and \$R_2\$, with two possible pairs of values for \$R_1\$ and \$R_2\$, and one of those pairs may contain negative (or even complex) values.

It's only quadratic in \$R_1\$ and \$R_2\$, though, not \$I_1\$ or \$V_{OUT}\$. After you've found \$R_1\$ and \$R_2\$, these are constant values, which when plugged into the original equation yield a linear relationship between \$I_1\$ and \$V_{OUT}\$.

Both pairs of results you obtain for \$R_1\$ and \$R_2\$ are algebraically legitimate, although only the positive, real solution is feasible in reality, using real components.


Because the equation to solve a particular resistor value is quadratic, it doesn't mean that the circuit is non-linear.

Look at your Vout expression, there are no quadratic terms for your current or voltages. In fact, it's a linear sum of your currents.

It IS linear!


I think you're leaving something out of the problem description. You have one equation in two unknowns, which simplifies to:

\$R_1 = 24*R_2 + 240k\Omega\$

This is for a perfect 0.1V output with \$I_1 = 0\$. So the answer cannot be \$R_1 = 240\mathrm k\Omega\$ and \$R_2 = 78.125\Omega\$. And indeed, if you plug those values into a simulator the answer is slightly off. (Note that the resistor is actually 78.125 ohms despite being displayed as 78.13.)


simulate this circuit – Schematic created using CircuitLab

I'm not sure where you're getting a quadratic equation from, either. You can sometimes end up with multiple solutions to a system of equations. In that case you use some other constraint to discard one of the solutions. For example, maybe one value must be positive, or one value must be greater than another. But I'm not sure that should happen here.

  • 1
    \$\begingroup\$ Thank you for your reply. It is true that that 240k was 241875 Ohm if I recall properly. I just rounded that to 240k as I was not sure about the correct value and it was not essential to the question itself. \$\endgroup\$ Mar 7, 2023 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.