# How can I rewrite this expression in terms of V_o/V_s?

$$\frac{V_o-\frac{A \left(R_{\text{int}} \left(V_s-V_1\right)\right)}{R_{\text{int}}+R_s}}{R_o}+\frac{V_o}{R_L}+\frac{V_o-V_1}{R_1}=\frac{V_1-V_s}{R_{\text{int}}+R_s}+\frac{V_1-V_o}{R_1}+\frac{V_1}{R_2}$$

I'm trying to rewrite the above expression in terms of V_o/V_s, but am having trouble figuring out to do this in mathematica. I tried using solve twice, first for V_o and then for V_s and doing Simplify[] on the quotient but my answer was insanely complex and I'm assuming not a correct solution to my homework problem. Is there a more direct way to do this?

• Please include your equation as a Mathematica expression, so people don't have to retype it in order to try and help you. – MarcoB Oct 7 '15 at 18:44
• Do you need things in terms of V1/V_s too (because that makes more sense)? – march Oct 7 '15 at 19:17

## 1 Answer

This will get you started. Per my comment (which to me makes sense), I am going to put things in terms of V1/Vs as well. Feel free to alter the solution to your heart's content.

expr = (Vo - (A (Rint (Vs - V1)))/(Rint + Rs))/Ro + Vo/RL + (Vo - V1)/R1 == (V1 - Vs)/(Rint + Rs) + (V1 - Vo)/R1 + V1/R2;
expr2 = Map[Simplify[#/Vs /. {Vo -> x Vs, V1 -> y Vs}] &, %, {2}]
expr2 /. {x -> Vo/Vs, y -> V1/Vs}


results in Solving for x instead:

Simplify /@ Collect[x /. First@Solve[expr2, x] // Expand, y] /. y -> V1/Vs


results in You don't need to do the Simplify if you don't want.

• I'm trying to get an expression of the form Vo/Vs={expr in terms of other variables}. The problem is to calculate the gain of an amplifier circuit so I want the output voltage over the signal voltage. – nw. Oct 7 '15 at 20:00
• @nw. Okay: "rewriting the expression in terms of..." is what I did. So really, you mean, "solve for...". Please re-write your question to make this clear, and also follow MarcoB's suggestion to include the Mathematica code in your question. – march Oct 7 '15 at 20:21
• Yes sorry, that is what I meant. – nw. Oct 7 '15 at 20:25
• @nw. I updated the answer. I'm not sure if you saw it. – march Oct 8 '15 at 18:39
• Thanks! That's the same thing I got with solve, just couldn't believe they'd give us something that nasty, especially since most of my class is doing algebra by hand! – nw. Oct 8 '15 at 23:03