$$ \newcommand{\rth}{R_{TH}} \newcommand{\vth}{V_{TH}} \newcommand{\rf}{R_{F}} $$
Asked this in the math stack exchange, who recommended asking here instead.
I'm stumped (hence posting here!) with what is probably a very simple extrapolation.
Consider this circuit:
The values supplied are based on an example that I am working with. I need to better understand how the resistance values were derived as I need to change the reference (from 3.3V to 2.5V), the $V_{in}$ (from 0 to 3.3V to 0 to 2.5V), and the $V_{out}$ from $\pm 36V$ to $\pm 40V$.
So I'm seeking guidance on how to calculate the resistor values. Leading up to this, I have a good understanding.
Here is the transfer function for this circuit: $$ OUT = IN (1 + \frac{\rf}{\rth}) - \vth \frac{\rf}{\rth}. $$ The opamp is supplied with +45 and -45 V rails and it can safely swing between $\pm 40V$ at those levels.
The desired output will go from $-40$ to $-40V$ as the input goes from $0$ to $+2.5V$ (at $1.25V$ the output will sit at $0V$).
The gain is calculated thusly:
\begin{align} Gain (\text{non-inverting}) &= (36 - (-36))/3.3 = 72/3.3 = 21.81818182\\ Gain(\text{inverting}) &= Gain (\text{non-inverting}) - 1 = 20.81818182 = \frac{\rf}{\rth} \end{align}
The resistor values are calculated using this formula: $$ \vth = 3.3 V (\frac{R_2 }{ R_1 + R_2}). $$
First, I must find $\vth$. Here's the formula for that:
\begin{align} -36 V &= 0 - \vth (\frac{\rf}{\rth})\\ \vth &= 1.729257642 V \end{align}
In the above, $\frac{\rf}{\rth}$ is taken as an unknown, so: \begin{align} -36V &= 0-\vth \frac{\rf}{\rth}\\ -36/20.81818182 = \vth \end{align}
Now, here's the sticky part: \begin{align} \vth &= 3.3 V \frac{R_2 }{ (R_1 + R_2)}\\ 1.729257642 V &= 3.3 V \frac{R_2}{(R_1 + R_2)}\\ 1.729257642/3.3 V &= \frac{R_2}{R_1 + R_2}\\ 1.729257642/3.3 V &= 0.5240\\ \end{align}
From $0.5240$, how in blazes do I calculate the value of $R_2$, $R_1$ and $\rf$? $$ \rf = gain * \rth $$ ( but $\rth$ is $R_2/(R_1+R_2)$ ):
$$ \rf = 20.81818182 * \rth $$ Seems as if I need to choose one value out of the blue to get the others??
--
Based on suggestions I tried this circuit:
And this is the output:
Third try: