Teaching physics is more fun than teaching math,
but math is more fun than physics.
but math is more fun than physics.
Inspired by a private communication with Michael Hug and a reference to https://keenonmaths.org/infinite-series-parallel-resistors-connection, I present here how to compute the resistance of a resistors-connection with continued fractions and with some help of Euler. https://www.17centurymaths.com/contents/euler/e071tr.pdf
The resistor network of interest looks like this:
Out[]=
The computation rules for two series- and parallel-resistors are:
In[]:=
series[x_,y_]:=x+y
In[]:=
parallel[x_,y_]:=+
1
1
x
1
y
In a first approach, all odd resistance are and all even resistance are . Then the network can be computed by this recurrence relation:
a
b
In[]:=
network[1]:=network[1]=series[a,b]network[n_]:=network[n]=series[a,parallel[b,network[n-1]]]
A continued fraction shows up:
In[]:=
network[5]
Out[]=
a++
1
1
b
1
a++
1
1
b
1
a++
1
1
b
1
a++
1
1
b
1
a+b
It can be expressed by ContinuedFractionK:
In[]:=
cf1=With[{n=5},a+ContinuedFractionK[1,If[Mod[k,2]==0,a,1/b],{k,1,2n-1}]]
Out[]=
a++
1
1
b
1
a++
1
1
b
1
a++
1
1
b
1
a++
1
1
b
1
a+b
Euler shows how to transform this into another continued fraction in Euler E71 §11:
In[]:=
cf2=With[{n=5},(a+ContinuedFractionK[b,If[Mod[k,2]==0,a,1],{k,1,2n-1}])]
Out[]=
a+
b
1+
b
a+
b
1+
b
a+
b
1+
b
a+
b
1+
b
a+b
And they are indeed the same:
In[]:=
Simplify[cf1==cf2]
Out[]=
True
If all resistors can have different resistances, this continued fraction shows up:
In[]:=
cf3=With[{n=5},+ContinuedFractionK[1,If[Mod[k,2]==0,,1/],{k,1,2n-1}]]
R
1
R
k+1
R
k+1
Out[]=
R
1
1
1
R
2
1
R
3
1
1
R
4
1
R
5
1
1
R
6
1
R
7
1
1
R
8
1
R
9
R
10
And again with the help of Euler:
In[]:=
cf4=With{n=5},+ContinuedFractionK,If[Mod[k,2]==0,,1],{k,1,2n-1}
R
1
R
2Quotient[k+1,2]
R
k+1
Out[]=
R
1
R
2
1++
R
2
R
3
R
4
1++
R
4
R
5
R
6
1++
R
6
R
7
R
8
1++
R
8
R
9
R
10
They are the same:
In[]:=
Simplify[cf3==cf4]
Out[]=
True
Now I want to construct a fancy value for an infinite resistor network, inspired by Euler E71 §35:
Out[]=
2
2
1
3+
1
5+
1
7+
1
9+
1
11+
1
13+
1
15+
1
17+
1
19+
1
...
First we check the values numerically:
In[]:=
N[1+ContinuedFractionK[1,2k+1,{k,1,10}],15]
Out[]=
1.31303528549933
In[]:=
N+1-1,15
2
2
Out[]=
1.31303528549933
Now we set the values of the resistors to obtain the same continued fraction as Euler in §35:
In[]:=
cf3
Out[]=
R
1
1
1
R
2
1
R
3
1
1
R
4
1
R
5
1
1
R
6
1
R
7
1
1
R
8
1
R
9
R
10
In[]:=
cf3/.->1inert[(2n-1)],->inert[2n-1]
R
n_?EvenQ
R
n_?OddQ
Out[]=
1+
1
3+
1
5+
1
7+
1
9+
1
11+
1
13+
1
15+
1
17+
1
19
So all odd resistors have the values and all even Resistors have the values Ω for .
R
k
(2k-1)Ω
R
k
1
2k-1
k∈
Appendix
Appendix
Let’s say all resistors have resistance 1Ω, what will be the resistance of the infinite network?
In[]:=
1+ContinuedFractionK[1,1,{k,1,∞}]
Out[]=
GoldenRatio
Let’s say all resistors have resistance 10Ω, (of course the answer will be ):
10GoldenRatio
In[]:=
cf=Simplify[10+ContinuedFractionK[1,If[Mod[k,2]==0,10,1/10],{k,1,∞}]]
Out[]=
5(1+
5
)In[]:=
cf==10GoldenRatio
Out[]=
True
Let’s say all odd resistors have resistance 10Ω and all even 20Ω, what is the resistance of the infinite network?:
In[]:=
10+ContinuedFractionK[1,If[Mod[k,2]==0,10,1/20],{k,1,∞}]
Out[]=
20
Let’s say all odd resistors have resistance 20Ω and all even 10Ω, what is the resistance of the infinite network?:
In[]:=
Simplify[20+ContinuedFractionK[1,If[Mod[k,2]==0,20,1/10],{k,1,∞}]]
Out[]=
10(1+
3
)Let’s say all odd resistors have resistance and all even :
a
b
In[]:=
s==network[5]/.{a+b->inert["..."]}
Out[]=
sa++
1
1
b
1
a++
1
1
b
1
a++
1
1
b
1
a++
1
1
b
1
...
Convergence is guaranteed for positive and positive . So the following is sound. This continued fraction is equivalent to and can be solved for :
a
b
s=a++
1
1
b
1
s
s
Check if all resistors have resistance 1Ω:
This is again the golden ratio:
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Continued fraction solution for an infinite series-parallel-resistors-connection
by Oliver Seipel
Wolfram Community, STAFF PICKS, April 14, 2024
https://community.wolfram.com/groups/-/m/t/3157476
by Oliver Seipel
Wolfram Community, STAFF PICKS, April 14, 2024
https://community.wolfram.com/groups/-/m/t/3157476