kill(all)$

electro(chem) , measurement with bridge ' Weathstone Bridge',part 5:version 1.0
peter.vlasschaert@gmail.com,12/01/2020

load packages 
============

load(lrats)$

wheatstone - bridge
===============

first part : KVL
===========

Loop : L1  (use KVL ,LAW)
=====================
loop direction : ccw ( = counter clock wise)

p1a:e+i2*R2-R1*i1 = 0;

Loop : L2  (use KVL ,LAW)
=====================
loop direction : cw ( =  clock wise)

p1b:e-i4*Rx+i3*R3 =0;

second part: KCL 
==============

node A :
======

p2a:i+i1 =i3;

node B :
======

p2b:i+i4=i2;

thrid part : Balanced when i=0,through galvanometer(read zero)
=================================================
use : p2a,p2b,  'balanced = e = 0'

p3a:subst([i=0],p2a);
p3a1:rhs(p3a) = lhs(p3a);
p3b:subst([i=0],p2b);
p3b1:rhs(p3b) = lhs(p3b);

fourth part : use "thrid part"" into "first part"
================================
because : i1,i2 from voltage source (=V) in circuit.

a)  method :eliminate
=================

p4:subst([p3a1,p3b],[p1a,p1b]);

p5:eliminate(p4,[i2]);

p5a:solve(p5[1],e)[1];

because : balanced circuit. (e=0),i1 ≠ 0
==============================

p5b:subst([e=0],p5a);

to find Rx
========
i1 ≠ 0  take  i1 =1

p5c:lhs(p5b) = subst([i1=1],num(rhs(p5b)));

p5d:solve(p5c,Rx)[1];

b)  another method
===============
use :p4

p6a:p4[1];
p6b:p4[2];

1e) solve : i2 for p6a

p6a1:solve(p6a,i2);

2e) subst i2 into p6b

p6b1:subst(p6a1,p6b);

3e) solve for e

p6b2:solve(p6b1,e)[1];

to find Rx
========
i1 ≠ 0  take  i1 =1

p6b3:lhs(p6b2) = subst([i1=1],num(rhs(p6b2)));

p6b4:subst([e=0],p6b3);

p6b5:solve([p6b4],Rx)[1];

check solution :'p5d' & 'p6b5'
=======================

is(rhs(p5d)=rhs(p6b5));