# Find transfer function from system of equations

I have a system of equations, For example:

eqns = {a1 x + b1 y + c1 z == d1, a2 x + b2 y + c2 z == d2, a3 x + b3 y + c3 z == d3};


and for this I need to find x/y in the output.

This is just an example equation. The real equation may be larger with more variables, but I need x/y (transfer function) as the output.

• I think you are abusing terminology here. A transfer function a ratio of the Laplace transform of the output to the Laplace transform of the input. And it is a ratio between one output to one input. But you have 3 equations given and there is not even time variable involved any where. Now it is possible to make a matrix of transfer functions (done for multiple input/multiple outputs system). But I have no idea what your equations represent and why you are using the term transfer function unless this is an x'=A*b system and you are shown the A and b parts only? more context is needed. Commented Feb 19, 2020 at 6:01

First, let the desired quantity appear in the equations, e.g., name it the ratio $$r = x / y$$, then solve solely for it, which can be implemented by a special syntax of Solve as shown below:

neweqns = eqns /. x -> r y // Simplify
Solve[neweqns, r, {y, z}] // Simplify


For the new version of equations appearing in the comment

eqns = {gm V1 + Vout/Rd == 0, V1 == Vin - Vs, Vs == gm (Vin - Vs) ((Rs/2)/(1 + s Cs Rs))};


as mentioned in the comment, the number of the unknown variables should be the same as that of the independent equations, otherwise, it may not constitute a "well-defined" problem to solve (overdetermined or underdetermined).

Anyway, if now Vs is the 3rd unknown, the ratio can be found in the same spirit as above:

neweqns = eqns /. Vout -> r Vin
Solve[neweqns, r, {Vin, Vs}] // Simplify


The result is

{{r -> -((2 gm Rd (1 + Cs Rs s))/(2 + gm Rs + 2 Cs Rs s))}}


which "happens to" be free of V1. And it is also true for an exchange Vs $$\leftrightarrow$$ V1.

• eqns={gm V1 + Vout/Rd == 0, V1 == Vin - Vs, Vs == gm (Vin - Vs) ((Rs/2)/(1 + s Cs Rs))}. This is the equation I want to solve for $V_{out}/V_{in}$. Using above method I am not getting correct answer. Commented Feb 19, 2020 at 5:47
• @MohitSingh So then what ratio do you want from these equations? Commented Feb 19, 2020 at 5:49
• @ Αλέξανδρος Ζεγγ $V_{out}/V_{in}$ Commented Feb 19, 2020 at 5:51
• @MohitSingh Well what are considered as the knowns and the unknowns, respectively? Commented Feb 19, 2020 at 5:54
• @MohitSingh Of course above code shall not work for your second version of equations, which do not contain x, y and z at all. Commented Feb 19, 2020 at 5:57