/* Mathematica notebook for the transmembrane potential expression for an myelinated axon that is under a tranversal DC electric field exposure */ 
/* Step 1: Solve equations (A5)- (A12) in Appendix */

Solve[-E0 a +C0/a==a A1+C1/a
&&S0 (-E0-C0/a^2)==(A1-C1/a^2) S1
&&b A1+C1/b==b A2+C2/b
&&S1 (A1-C1/b^2)==S2 (A2-C2/b^2)
&&c A2+C2/c==c A3+C3/c
&&S2(A2-C2/c^2)==S3 (A3-C3/c^2)
&&d A3+C3/d==d A4
&&S3 (A3-C3/d^2)==S4 A4,{C0,A1,C1,A2, C2, A3, C3,A4}]

C0=-(((a^4) (b^2) (c^2) E0 S0 S1 S2 S3+(a^2) (b^4) (c^2) E0 S0 S1 S2 S3+(a^4) (c^4) E0 S0 S1 S2 S3+(a^2) (b^2) (c^4) E0 S0 S1 S2 S3+(a^4) (b^2) (d^2) E0 S0 S1 S2 S3+(a^2) (b^4) (d^2) E0 S0 S1 S2 S3+(a^4) (c^2) (d^2) E0 S0 S1 S2 S3+(a^2) (b^2) (c^2) (d^2) E0 S0 S1 S2 S3-(a^4) (b^2) (c^2) E0 (S1^2) S2 S3+(a^2) (b^4) (c^2) E0 (S1^2) S2 S3-(a^4) (c^4) E0 (S1^2) S2 S3+(a^2) (b^2) (c^4) E0 (S1^2) S2 S3-(a^4) (b^2) (d^2) E0 (S1^2) S2 S3+(a^2) (b^4) (d^2) E0 (S1^2) S2 S3-(a^4) (c^2) (d^2) E0 (S1^2) S2 S3+(a^2) (b^2) (c^2) (d^2) E0 (S1^2) S2 S3+(a^4) (b^2) (c^2) E0 S0 (S2^2) S3-(a^2) (b^4) (c^2) E0 S0 (S2^2) S3-(a^4) (c^4) E0 S0 (S2^2) S3+(a^2) (b^2) (c^4) E0 S0 (S2^2) S3+(a^4) (b^2) (d^2) E0 S0 (S2^2) S3-(a^2) (b^4) (d^2) E0 S0 (S2^2) S3-(a^4) (c^2) (d^2) E0 S0 (S2^2) S3+(a^2) (b^2) (c^2) (d^2) E0 S0 (S2^2) S3-(a^4) (b^2) (c^2) E0 S1 (S2^2) S3-(a^2) (b^4) (c^2) E0 S1 (S2^2) S3+(a^4) (c^4) E0 S1 (S2^2) S3+(a^2) (b^2) (c^4) E0 S1 (S2^2) S3-(a^4) (b^2) (d^2) E0 S1 (S2^2) S3-(a^2) (b^4) (d^2) E0 S1 (S2^2) S3+(a^4) (c^2) (d^2) E0 S1 (S2^2) S3+(a^2) (b^2) (c^2) (d^2) E0 S1 (S2^2) S3+(a^4) (b^2) (c^2) E0 S0 S1 (S3^2)+(a^2) (b^4) (c^2) E0 S0 S1 (S3^2)-(a^4) (c^4) E0 S0 S1 (S3^2)-(a^2) (b^2) (c^4) E0 S0 S1 (S3^2)-(a^4) (b^2) (d^2) E0 S0 S1 (S3^2)-(a^2) (b^4) (d^2) E0 S0 S1 (S3^2)+(a^4) (c^2) (d^2) E0 S0 S1 (S3^2)+(a^2) (b^2) (c^2) (d^2) E0 S0 S1 (S3^2)-(a^4) (b^2) (c^2) E0 (S1^2) (S3^2)+(a^2) (b^4) (c^2) E0 (S1^2) (S3^2)+(a^4) (c^4) E0 (S1^2) (S3^2)-(a^2) (b^2) (c^4) E0 (S1^2) (S3^2)+(a^4) (b^2) (d^2) E0 (S1^2) (S3^2)-(a^2) (b^4) (d^2) E0 (S1^2) (S3^2)-(a^4) (c^2) (d^2) E0 (S1^2) (S3^2)+(a^2) (b^2) (c^2) (d^2) E0 (S1^2) (S3^2)+(a^4) (b^2) (c^2) E0 S0 S2 (S3^2)-(a^2) (b^4) (c^2) E0 S0 S2 (S3^2)+(a^4) (c^4) E0 S0 S2 (S3^2)-(a^2) (b^2) (c^4) E0 S0 S2 (S3^2)-(a^4) (b^2) (d^2) E0 S0 S2 (S3^2)+(a^2) (b^4) (d^2) E0 S0 S2 (S3^2)-(a^4) (c^2) (d^2) E0 S0 S2 (S3^2)+(a^2) (b^2) (c^2) (d^2) E0 S0 S2 (S3^2)-(a^4) (b^2) (c^2) E0 S1 S2 (S3^2)-(a^2) (b^4) (c^2) E0 S1 S2 (S3^2)-(a^4) (c^4) E0 S1 S2 (S3^2)-(a^2) (b^2) (c^4) E0 S1 S2 (S3^2)+(a^4) (b^2) (d^2) E0 S1 S2 (S3^2)+(a^2) (b^4) (d^2) E0 S1 S2 (S3^2)+(a^4) (c^2) (d^2) E0 S1 S2 (S3^2)+(a^2) (b^2) (c^2) (d^2) E0 S1 S2 (S3^2)+(a^4) (b^2) (c^2) E0 S0 S1 S2 S4+(a^2) (b^4) (c^2) E0 S0 S1 S2 S4+(a^4) (c^4) E0 S0 S1 S2 S4+(a^2) (b^2) (c^4) E0 S0 S1 S2 S4-(a^4) (b^2) (d^2) E0 S0 S1 S2 S4-(a^2) (b^4) (d^2) E0 S0 S1 S2 S4-(a^4) (c^2) (d^2) E0 S0 S1 S2 S4-(a^2) (b^2) (c^2) (d^2) E0 S0 S1 S2 S4-(a^4) (b^2) (c^2) E0 (S1^2) S2 S4+(a^2) (b^4) (c^2) E0 (S1^2) S2 S4-(a^4) (c^4) E0 (S1^2) S2 S4+(a^2) (b^2) (c^4) E0 (S1^2) S2 S4+(a^4) (b^2) (d^2) E0 (S1^2) S2 S4-(a^2) (b^4) (d^2) E0 (S1^2) S2 S4+(a^4) (c^2) (d^2) E0 (S1^2) S2 S4-(a^2) (b^2) (c^2) (d^2) E0 (S1^2) S2 S4+(a^4) (b^2) (c^2) E0 S0 (S2^2) S4-(a^2) (b^4) (c^2) E0 S0 (S2^2) S4-(a^4) (c^4) E0 S0 (S2^2) S4+(a^2) (b^2) (c^4) E0 S0 (S2^2) S4-(a^4) (b^2) (d^2) E0 S0 (S2^2) S4+(a^2) (b^4) (d^2) E0 S0 (S2^2) S4+(a^4) (c^2) (d^2) E0 S0 (S2^2) S4-(a^2) (b^2) (c^2) (d^2) E0 S0 (S2^2) S4-(a^4) (b^2) (c^2) E0 S1 (S2^2) S4-(a^2) (b^4) (c^2) E0 S1 (S2^2) S4+(a^4) (c^4) E0 S1 (S2^2) S4+(a^2) (b^2) (c^4) E0 S1 (S2^2) S4+(a^4) (b^2) (d^2) E0 S1 (S2^2) S4+(a^2) (b^4) (d^2) E0 S1 (S2^2) S4-(a^4) (c^2) (d^2) E0 S1 (S2^2) S4-(a^2) (b^2) (c^2) (d^2) E0 S1 (S2^2) S4+(a^4) (b^2) (c^2) E0 S0 S1 S3 S4+(a^2) (b^4) (c^2) E0 S0 S1 S3 S4-(a^4) (c^4) E0 S0 S1 S3 S4-(a^2) (b^2) (c^4) E0 S0 S1 S3 S4+(a^4) (b^2) (d^2) E0 S0 S1 S3 S4+(a^2) (b^4) (d^2) E0 S0 S1 S3 S4-(a^4) (c^2) (d^2) E0 S0 S1 S3 S4-(a^2) (b^2) (c^2) (d^2) E0 S0 S1 S3 S4-(a^4) (b^2) (c^2) E0 (S1^2) S3 S4+(a^2) (b^4) (c^2) E0 (S1^2) S3 S4+(a^4) (c^4) E0 (S1^2) S3 S4-(a^2) (b^2) (c^4) E0 (S1^2) S3 S4-(a^4) (b^2) (d^2) E0 (S1^2) S3 S4+(a^2) (b^4) (d^2) E0 (S1^2) S3 S4+(a^4) (c^2) (d^2) E0 (S1^2) S3 S4-(a^2) (b^2) (c^2) (d^2) E0 (S1^2) S3 S4+(a^4) (b^2) (c^2) E0 S0 S2 S3 S4-(a^2) (b^4) (c^2) E0 S0 S2 S3 S4+(a^4) (c^4) E0 S0 S2 S3 S4-(a^2) (b^2) (c^4) E0 S0 S2 S3 S4+(a^4) (b^2) (d^2) E0 S0 S2 S3 S4-(a^2) (b^4) (d^2) E0 S0 S2 S3 S4+(a^4) (c^2) (d^2) E0 S0 S2 S3 S4-(a^2) (b^2) (c^2) (d^2) E0 S0 S2 S3 S4-(a^4) (b^2) (c^2) E0 S1 S2 S3 S4-(a^2) (b^4) (c^2) E0 S1 S2 S3 S4-(a^4) (c^4) E0 S1 S2 S3 S4-(a^2) (b^2) (c^4) E0 S1 S2 S3 S4-(a^4) (b^2) (d^2) E0 S1 S2 S3 S4-(a^2) (b^4) (d^2) E0 S1 S2 S3 S4-(a^4) (c^2) (d^2) E0 S1 S2 S3 S4-(a^2) (b^2) (c^2) (d^2) E0 S1 S2 S3 S4)/((a^2) (b^2) (c^2) S0 S1 S2 S3+(b^4) (c^2) S0 S1 S2 S3+(a^2) (c^4) S0 S1 S2 S3+(b^2) (c^4) S0 S1 S2 S3+(a^2) (b^2) (d^2) S0 S1 S2 S3+(b^4) (d^2) S0 S1 S2 S3+(a^2) (c^2) (d^2) S0 S1 S2 S3+(b^2) (c^2) (d^2) S0 S1 S2 S3+(a^2) (b^2) (c^2) (S1^2) S2 S3-(b^4) (c^2) (S1^2) S2 S3+(a^2) (c^4) (S1^2) S2 S3-(b^2) (c^4) (S1^2) S2 S3+(a^2) (b^2) (d^2) (S1^2) S2 S3-(b^4) (d^2) (S1^2) S2 S3+(a^2) (c^2) (d^2) (S1^2) S2 S3-(b^2) (c^2) (d^2) (S1^2) S2 S3+(a^2) (b^2) (c^2) S0 (S2^2) S3-(b^4) (c^2) S0 (S2^2) S3-(a^2) (c^4) S0 (S2^2) S3+(b^2) (c^4) S0 (S2^2) S3+(a^2) (b^2) (d^2) S0 (S2^2) S3-(b^4) (d^2) S0 (S2^2) S3-(a^2) (c^2) (d^2) S0 (S2^2) S3+(b^2) (c^2) (d^2) S0 (S2^2) S3+(a^2) (b^2) (c^2) S1 (S2^2) S3+(b^4) (c^2) S1 (S2^2) S3-(a^2) (c^4) S1 (S2^2) S3-(b^2) (c^4) S1 (S2^2) S3+(a^2) (b^2) (d^2) S1 (S2^2) S3+(b^4) (d^2) S1 (S2^2) S3-(a^2) (c^2) (d^2) S1 (S2^2) S3-(b^2) (c^2) (d^2) S1 (S2^2) S3+(a^2) (b^2) (c^2) S0 S1 (S3^2)+(b^4) (c^2) S0 S1 (S3^2)-(a^2) (c^4) S0 S1 (S3^2)-(b^2) (c^4) S0 S1 (S3^2)-(a^2) (b^2) (d^2) S0 S1 (S3^2)-(b^4) (d^2) S0 S1 (S3^2)+(a^2) (c^2) (d^2) S0 S1 (S3^2)+(b^2) (c^2) (d^2) S0 S1 (S3^2)+(a^2) (b^2) (c^2) (S1^2) (S3^2)-(b^4) (c^2) (S1^2) (S3^2)-(a^2) (c^4) (S1^2) (S3^2)+(b^2) (c^4) (S1^2) (S3^2)-(a^2) (b^2) (d^2) (S1^2) (S3^2)+(b^4) (d^2) (S1^2) (S3^2)+(a^2) (c^2) (d^2) (S1^2) (S3^2)-(b^2) (c^2) (d^2) (S1^2) (S3^2)+(a^2) (b^2) (c^2) S0 S2 (S3^2)-(b^4) (c^2) S0 S2 (S3^2)+(a^2) (c^4) S0 S2 (S3^2)-(b^2) (c^4) S0 S2 (S3^2)-(a^2) (b^2) (d^2) S0 S2 (S3^2)+(b^4) (d^2) S0 S2 (S3^2)-(a^2) (c^2) (d^2) S0 S2 (S3^2)+(b^2) (c^2) (d^2) S0 S2 (S3^2)+(a^2) (b^2) (c^2) S1 S2 (S3^2)+(b^4) (c^2) S1 S2 (S3^2)+(a^2) (c^4) S1 S2 (S3^2)+(b^2) (c^4) S1 S2 (S3^2)-(a^2) (b^2) (d^2) S1 S2 (S3^2)-(b^4) (d^2) S1 S2 (S3^2)-(a^2) (c^2) (d^2) S1 S2 (S3^2)-(b^2) (c^2) (d^2) S1 S2 (S3^2)+(a^2) (b^2) (c^2) S0 S1 S2 S4+(b^4) (c^2) S0 S1 S2 S4+(a^2) (c^4) S0 S1 S2 S4+(b^2) (c^4) S0 S1 S2 S4-(a^2) (b^2) (d^2) S0 S1 S2 S4-(b^4) (d^2) S0 S1 S2 S4-(a^2) (c^2) (d^2) S0 S1 S2 S4-(b^2) (c^2) (d^2) S0 S1 S2 S4+(a^2) (b^2) (c^2) (S1^2) S2 S4-(b^4) (c^2) (S1^2) S2 S4+(a^2) (c^4) (S1^2) S2 S4-(b^2) (c^4) (S1^2) S2 S4-(a^2) (b^2) (d^2) (S1^2) S2 S4+(b^4) (d^2) (S1^2) S2 S4-(a^2) (c^2) (d^2) (S1^2) S2 S4+(b^2) (c^2) (d^2) (S1^2) S2 S4+(a^2) (b^2) (c^2) S0 (S2^2) S4-(b^4) (c^2) S0 (S2^2) S4-(a^2) (c^4) S0 (S2^2) S4+(b^2) (c^4) S0 (S2^2) S4-(a^2) (b^2) (d^2) S0 (S2^2) S4+(b^4) (d^2) S0 (S2^2) S4+(a^2) (c^2) (d^2) S0 (S2^2) S4-(b^2) (c^2) (d^2) S0 (S2^2) S4+(a^2) (b^2) (c^2) S1 (S2^2) S4+(b^4) (c^2) S1 (S2^2) S4-(a^2) (c^4) S1 (S2^2) S4-(b^2) (c^4) S1 (S2^2) S4-(a^2) (b^2) (d^2) S1 (S2^2) S4-(b^4) (d^2) S1 (S2^2) S4+(a^2) (c^2) (d^2) S1 (S2^2) S4+(b^2) (c^2) (d^2) S1 (S2^2) S4+(a^2) (b^2) (c^2) S0 S1 S3 S4+(b^4) (c^2) S0 S1 S3 S4-(a^2) (c^4) S0 S1 S3 S4-(b^2) (c^4) S0 S1 S3 S4+(a^2) (b^2) (d^2) S0 S1 S3 S4+(b^4) (d^2) S0 S1 S3 S4-(a^2) (c^2) (d^2) S0 S1 S3 S4-(b^2) (c^2) (d^2) S0 S1 S3 S4+(a^2) (b^2) (c^2) (S1^2) S3 S4-(b^4) (c^2) (S1^2) S3 S4-(a^2) (c^4) (S1^2) S3 S4+(b^2) (c^4) (S1^2) S3 S4+(a^2) (b^2) (d^2) (S1^2) S3 S4-(b^4) (d^2) (S1^2) S3 S4-(a^2) (c^2) (d^2) (S1^2) S3 S4+(b^2) (c^2) (d^2) (S1^2) S3 S4+(a^2) (b^2) (c^2) S0 S2 S3 S4-(b^4) (c^2) S0 S2 S3 S4+(a^2) (c^4) S0 S2 S3 S4-(b^2) (c^4) S0 S2 S3 S4+(a^2) (b^2) (d^2) S0 S2 S3 S4-(b^4) (d^2) S0 S2 S3 S4+(a^2) (c^2) (d^2) S0 S2 S3 S4-(b^2) (c^2) (d^2) S0 S2 S3 S4+(a^2) (b^2) (c^2) S1 S2 S3 S4+(b^4) (c^2) S1 S2 S3 S4+(a^2) (c^4) S1 S2 S3 S4+(b^2) (c^4) S1 S2 S3 S4+(a^2) (b^2) (d^2) S1 S2 S3 S4+(b^4) (d^2) S1 S2 S3 S4+(a^2) (c^2) (d^2) S1 S2 S3 S4+(b^2) (c^2) (d^2) S1 S2 S3 S4))

Simplify[C0]

A1=-((2 E0 S0 (-((2 S1 S2 (-((2 S2 S3 ((S3/d)+(S4/d)))/(c^3))-(-(S2/(c^3))+(S3/(c^3))) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2)))))/(b^3))-(-(S1/(b^3))+(S2/(b^3))) (S2 (-((2 S2 S3 ((S3/d)+(S4/d)))/(c^3))-(-(S2/(c^3))+(S3/(c^3))) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2))))+((S2 (-((2 S3 (-((S2 S3)/d)-((S2 S4)/d)))/c)-((S2/c)+(S3/c)) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2)))))/(b^2)))))/(a (-(-(S0/a)-(S1/a)) (-((2 S1 S2 (-((2 S2 S3 ((S3/d)+(S4/d)))/(c^3))-(-(S2/(c^3))+(S3/(c^3))) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2)))))/(b^3))-(-(S1/(b^3))+(S2/(b^3))) (S2 (-((2 S2 S3 ((S3/d)+(S4/d)))/(c^3))-(-(S2/(c^3))+(S3/(c^3))) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2))))+((S2 (-((2 S3 (-((S2 S3)/d)-((S2 S4)/d)))/c)-((S2/c)+(S3/c)) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2)))))/(b^2))))+(-(S0/(a^3))+(S1/(a^3))) (((2 S1 S2 (-((2 S2 S3 ((S3/d)+(S4/d)))/(c^3))-(-(S2/(c^3))+(S3/(c^3))) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2)))))/b)-((S1/b)+(S2/b)) (S2 (-((2 S2 S3 ((S3/d)+(S4/d)))/(c^3))-(-(S2/(c^3))+(S3/(c^3))) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2))))+((S2 (-((2 S3 (-((S2 S3)/d)-((S2 S4)/d)))/c)-((S2/c)+(S3/c)) (S3 ((S3/d)+(S4/d))+((S3 (-d S3+d S4))/(c^2)))))/(b^2)))))))

FullSimplify[A1]

C1=-((2 E0 S0 ((a^2) (b^4) (c^2) S1 S2 S3+(a^2) (b^2) (c^4) S1 S2 S3+(a^2) (b^4) (d^2) S1 S2 S3+(a^2) (b^2) (c^2) (d^2) S1 S2 S3-(a^2) (b^4) (c^2) (S2^2) S3+(a^2) (b^2) (c^4) (S2^2) S3-(a^2) (b^4) (d^2) (S2^2) S3+(a^2) (b^2) (c^2) (d^2) (S2^2) S3+(a^2) (b^4) (c^2) S1 (S3^2)-(a^2) (b^2) (c^4) S1 (S3^2)-(a^2) (b^4) (d^2) S1 (S3^2)+(a^2) (b^2) (c^2) (d^2) S1 (S3^2)-(a^2) (b^4) (c^2) S2 (S3^2)-(a^2) (b^2) (c^4) S2 (S3^2)+(a^2) (b^4) (d^2) S2 (S3^2)+(a^2) (b^2) (c^2) (d^2) S2 (S3^2)+(a^2) (b^4) (c^2) S1 S2 S4+(a^2) (b^2) (c^4) S1 S2 S4-(a^2) (b^4) (d^2) S1 S2 S4-(a^2) (b^2) (c^2) (d^2) S1 S2 S4-(a^2) (b^4) (c^2) (S2^2) S4+(a^2) (b^2) (c^4) (S2^2) S4+(a^2) (b^4) (d^2) (S2^2) S4-(a^2) (b^2) (c^2) (d^2) (S2^2) S4+(a^2) (b^4) (c^2) S1 S3 S4-(a^2) (b^2) (c^4) S1 S3 S4+(a^2) (b^4) (d^2) S1 S3 S4-(a^2) (b^2) (c^2) (d^2) S1 S3 S4-(a^2) (b^4) (c^2) S2 S3 S4-(a^2) (b^2) (c^4) S2 S3 S4-(a^2) (b^4) (d^2) S2 S3 S4-(a^2) (b^2) (c^2) (d^2) S2 S3 S4))/((a^2) (b^2) (c^2) S0 S1 S2 S3+(b^4) (c^2) S0 S1 S2 S3+(a^2) (c^4) S0 S1 S2 S3+(b^2) (c^4) S0 S1 S2 S3+(a^2) (b^2) (d^2) S0 S1 S2 S3+(b^4) (d^2) S0 S1 S2 S3+(a^2) (c^2) (d^2) S0 S1 S2 S3+(b^2) (c^2) (d^2) S0 S1 S2 S3+(a^2) (b^2) (c^2) (S1^2) S2 S3-(b^4) (c^2) (S1^2) S2 S3+(a^2) (c^4) (S1^2) S2 S3-(b^2) (c^4) (S1^2) S2 S3+(a^2) (b^2) (d^2) (S1^2) S2 S3-(b^4) (d^2) (S1^2) S2 S3+(a^2) (c^2) (d^2) (S1^2) S2 S3-(b^2) (c^2) (d^2) (S1^2) S2 S3+(a^2) (b^2) (c^2) S0 (S2^2) S3-(b^4) (c^2) S0 (S2^2) S3-(a^2) (c^4) S0 (S2^2) S3+(b^2) (c^4) S0 (S2^2) S3+(a^2) (b^2) (d^2) S0 (S2^2) S3-(b^4) (d^2) S0 (S2^2) S3-(a^2) (c^2) (d^2) S0 (S2^2) S3+(b^2) (c^2) (d^2) S0 (S2^2) S3+(a^2) (b^2) (c^2) S1 (S2^2) S3+(b^4) (c^2) S1 (S2^2) S3-(a^2) (c^4) S1 (S2^2) S3-(b^2) (c^4) S1 (S2^2) S3+(a^2) (b^2) (d^2) S1 (S2^2) S3+(b^4) (d^2) S1 (S2^2) S3-(a^2) (c^2) (d^2) S1 (S2^2) S3-(b^2) (c^2) (d^2) S1 (S2^2) S3+(a^2) (b^2) (c^2) S0 S1 (S3^2)+(b^4) (c^2) S0 S1 (S3^2)-(a^2) (c^4) S0 S1 (S3^2)-(b^2) (c^4) S0 S1 (S3^2)-(a^2) (b^2) (d^2) S0 S1 (S3^2)-(b^4) (d^2) S0 S1 (S3^2)+(a^2) (c^2) (d^2) S0 S1 (S3^2)+(b^2) (c^2) (d^2) S0 S1 (S3^2)+(a^2) (b^2) (c^2) (S1^2) (S3^2)-(b^4) (c^2) (S1^2) (S3^2)-(a^2) (c^4) (S1^2) (S3^2)+(b^2) (c^4) (S1^2) (S3^2)-(a^2) (b^2) (d^2) (S1^2) (S3^2)+(b^4) (d^2) (S1^2) (S3^2)+(a^2) (c^2) (d^2) (S1^2) (S3^2)-(b^2) (c^2) (d^2) (S1^2) (S3^2)+(a^2) (b^2) (c^2) S0 S2 (S3^2)-(b^4) (c^2) S0 S2 (S3^2)+(a^2) (c^4) S0 S2 (S3^2)-(b^2) (c^4) S0 S2 (S3^2)-(a^2) (b^2) (d^2) S0 S2 (S3^2)+(b^4) (d^2) S0 S2 (S3^2)-(a^2) (c^2) (d^2) S0 S2 (S3^2)+(b^2) (c^2) (d^2) S0 S2 (S3^2)+(a^2) (b^2) (c^2) S1 S2 (S3^2)+(b^4) (c^2) S1 S2 (S3^2)+(a^2) (c^4) S1 S2 (S3^2)+(b^2) (c^4) S1 S2 (S3^2)-(a^2) (b^2) (d^2) S1 S2 (S3^2)-(b^4) (d^2) S1 S2 (S3^2)-(a^2) (c^2) (d^2) S1 S2 (S3^2)-(b^2) (c^2) (d^2) S1 S2 (S3^2)+(a^2) (b^2) (c^2) S0 S1 S2 S4+(b^4) (c^2) S0 S1 S2 S4+(a^2) (c^4) S0 S1 S2 S4+(b^2) (c^4) S0 S1 S2 S4-(a^2) (b^2) (d^2) S0 S1 S2 S4-(b^4) (d^2) S0 S1 S2 S4-(a^2) (c^2) (d^2) S0 S1 S2 S4-(b^2) (c^2) (d^2) S0 S1 S2 S4+(a^2) (b^2) (c^2) (S1^2) S2 S4-(b^4) (c^2) (S1^2) S2 S4+(a^2) (c^4) (S1^2) S2 S4-(b^2) (c^4) (S1^2) S2 S4-(a^2) (b^2) (d^2) (S1^2) S2 S4+(b^4) (d^2) (S1^2) S2 S4-(a^2) (c^2) (d^2) (S1^2) S2 S4+(b^2) (c^2) (d^2) (S1^2) S2 S4+(a^2) (b^2) (c^2) S0 (S2^2) S4-(b^4) (c^2) S0 (S2^2) S4-(a^2) (c^4) S0 (S2^2) S4+(b^2) (c^4) S0 (S2^2) S4-(a^2) (b^2) (d^2) S0 (S2^2) S4+(b^4) (d^2) S0 (S2^2) S4+(a^2) (c^2) (d^2) S0 (S2^2) S4-(b^2) (c^2) (d^2) S0 (S2^2) S4+(a^2) (b^2) (c^2) S1 (S2^2) S4+(b^4) (c^2) S1 (S2^2) S4-(a^2) (c^4) S1 (S2^2) S4-(b^2) (c^4) S1 (S2^2) S4-(a^2) (b^2) (d^2) S1 (S2^2) S4-(b^4) (d^2) S1 (S2^2) S4+(a^2) (c^2) (d^2) S1 (S2^2) S4+(b^2) (c^2) (d^2) S1 (S2^2) S4+(a^2) (b^2) (c^2) S0 S1 S3 S4+(b^4) (c^2) S0 S1 S3 S4-(a^2) (c^4) S0 S1 S3 S4-(b^2) (c^4) S0 S1 S3 S4+(a^2) (b^2) (d^2) S0 S1 S3 S4+(b^4) (d^2) S0 S1 S3 S4-(a^2) (c^2) (d^2) S0 S1 S3 S4-(b^2) (c^2) (d^2) S0 S1 S3 S4+(a^2) (b^2) (c^2) (S1^2) S3 S4-(b^4) (c^2) (S1^2) S3 S4-(a^2) (c^4) (S1^2) S3 S4+(b^2) (c^4) (S1^2) S3 S4+(a^2) (b^2) (d^2) (S1^2) S3 S4-(b^4) (d^2) (S1^2) S3 S4-(a^2) (c^2) (d^2) (S1^2) S3 S4+(b^2) (c^2) (d^2) (S1^2) S3 S4+(a^2) (b^2) (c^2) S0 S2 S3 S4-(b^4) (c^2) S0 S2 S3 S4+(a^2) (c^4) S0 S2 S3 S4-(b^2) (c^4) S0 S2 S3 S4+(a^2) (b^2) (d^2) S0 S2 S3 S4-(b^4) (d^2) S0 S2 S3 S4+(a^2) (c^2) (d^2) S0 S2 S3 S4-(b^2) (c^2) (d^2) S0 S2 S3 S4+(a^2) (b^2) (c^2) S1 S2 S3 S4+(b^4) (c^2) S1 S2 S3 S4+(a^2) (c^4) S1 S2 S3 S4+(b^2) (c^4) S1 S2 S3 S4+(a^2) (b^2) (d^2) S1 S2 S3 S4+(b^4) (d^2) S1 S2 S3 S4+(a^2) (c^2) (d^2) S1 S2 S3 S4+(b^2) (c^2) (d^2) S1 S2 S3 S4))

FullSimplify[C1]

A2=-((4 (b^2) E0 S0 ((a^2) (c^2) S1 S2 S3+(a^2) (d^2) S1 S2 S3+(a^2) (c^2) S1 (S3^2)-(a^2) (d^2) S1 (S3^2)+(a^2) (c^2) S1 S2 S4-(a^2) (d^2) S1 S2 S4+(a^2) (c^2) S1 S3 S4+(a^2) (d^2) S1 S3 S4))/((a^2) (b^2) (c^2) S0 S1 S2 S3+(b^4) (c^2) S0 S1 S2 S3+(a^2) (c^4) S0 S1 S2 S3+(b^2) (c^4) S0 S1 S2 S3+(a^2) (b^2) (d^2) S0 S1 S2 S3+(b^4) (d^2) S0 S1 S2 S3+(a^2) (c^2) (d^2) S0 S1 S2 S3+(b^2) (c^2) (d^2) S0 S1 S2 S3+(a^2) (b^2) (c^2) (S1^2) S2 S3-(b^4) (c^2) (S1^2) S2 S3+(a^2) (c^4) (S1^2) S2 S3-(b^2) (c^4) (S1^2) S2 S3+(a^2) (b^2) (d^2) (S1^2) S2 S3-(b^4) (d^2) (S1^2) S2 S3+(a^2) (c^2) (d^2) (S1^2) S2 S3-(b^2) (c^2) (d^2) (S1^2) S2 S3+(a^2) (b^2) (c^2) S0 (S2^2) S3-(b^4) (c^2) S0 (S2^2) S3-(a^2) (c^4) S0 (S2^2) S3+(b^2) (c^4) S0 (S2^2) S3+(a^2) (b^2) (d^2) S0 (S2^2) S3-(b^4) (d^2) S0 (S2^2) S3-(a^2) (c^2) (d^2) S0 (S2^2) S3+(b^2) (c^2) (d^2) S0 (S2^2) S3+(a^2) (b^2) (c^2) S1 (S2^2) S3+(b^4) (c^2) S1 (S2^2) S3-(a^2) (c^4) S1 (S2^2) S3-(b^2) (c^4) S1 (S2^2) S3+(a^2) (b^2) (d^2) S1 (S2^2) S3+(b^4) (d^2) S1 (S2^2) S3-(a^2) (c^2) (d^2) S1 (S2^2) S3-(b^2) (c^2) (d^2) S1 (S2^2) S3+(a^2) (b^2) (c^2) S0 S1 (S3^2)+(b^4) (c^2) S0 S1 (S3^2)-(a^2) (c^4) S0 S1 (S3^2)-(b^2) (c^4) S0 S1 (S3^2)-(a^2) (b^2) (d^2) S0 S1 (S3^2)-(b^4) (d^2) S0 S1 (S3^2)+(a^2) (c^2) (d^2) S0 S1 (S3^2)+(b^2) (c^2) (d^2) S0 S1 (S3^2)+(a^2) (b^2) (c^2) (S1^2) (S3^2)-(b^4) (c^2) (S1^2) (S3^2)-(a^2) (c^4) (S1^2) (S3^2)+(b^2) (c^4) (S1^2) (S3^2)-(a^2) (b^2) (d^2) (S1^2) (S3^2)+(b^4) (d^2) (S1^2) (S3^2)+(a^2) (c^2) (d^2) (S1^2) (S3^2)-(b^2) (c^2) (d^2) (S1^2) (S3^2)+(a^2) (b^2) (c^2) S0 S2 (S3^2)-(b^4) (c^2) S0 S2 (S3^2)+(a^2) (c^4) S0 S2 (S3^2)-(b^2) (c^4) S0 S2 (S3^2)-(a^2) (b^2) (d^2) S0 S2 (S3^2)+(b^4) (d^2) S0 S2 (S3^2)-(a^2) (c^2) (d^2) S0 S2 (S3^2)+(b^2) (c^2) (d^2) S0 S2 (S3^2)+(a^2) (b^2) (c^2) S1 S2 (S3^2)+(b^4) (c^2) S1 S2 (S3^2)+(a^2) (c^4) S1 S2 (S3^2)+(b^2) (c^4) S1 S2 (S3^2)-(a^2) (b^2) (d^2) S1 S2 (S3^2)-(b^4) (d^2) S1 S2 (S3^2)-(a^2) (c^2) (d^2) S1 S2 (S3^2)-(b^2) (c^2) (d^2) S1 S2 (S3^2)+(a^2) (b^2) (c^2) S0 S1 S2 S4+(b^4) (c^2) S0 S1 S2 S4+(a^2) (c^4) S0 S1 S2 S4+(b^2) (c^4) S0 S1 S2 S4-(a^2) (b^2) (d^2) S0 S1 S2 S4-(b^4) (d^2) S0 S1 S2 S4-(a^2) (c^2) (d^2) S0 S1 S2 S4-(b^2) (c^2) (d^2) S0 S1 S2 S4+(a^2) (b^2) (c^2) (S1^2) S2 S4-(b^4) (c^2) (S1^2) S2 S4+(a^2) (c^4) (S1^2) S2 S4-(b^2) (c^4) (S1^2) S2 S4-(a^2) (b^2) (d^2) (S1^2) S2 S4+(b^4) (d^2) (S1^2) S2 S4-(a^2) (c^2) (d^2) (S1^2) S2 S4+(b^2) (c^2) (d^2) (S1^2) S2 S4+(a^2) (b^2) (c^2) S0 (S2^2) S4-(b^4) (c^2) S0 (S2^2) S4-(a^2) (c^4) S0 (S2^2) S4+(b^2) (c^4) S0 (S2^2) S4-(a^2) (b^2) (d^2) S0 (S2^2) S4+(b^4) (d^2) S0 (S2^2) S4+(a^2) (c^2) (d^2) S0 (S2^2) S4-(b^2) (c^2) (d^2) S0 (S2^2) S4+(a^2) (b^2) (c^2) S1 (S2^2) S4+(b^4) (c^2) S1 (S2^2) S4-(a^2) (c^4) S1 (S2^2) S4-(b^2) (c^4) S1 (S2^2) S4-(a^2) (b^2) (d^2) S1 (S2^2) S4-(b^4) (d^2) S1 (S2^2) S4+(a^2) (c^2) (d^2) S1 (S2^2) S4+(b^2) (c^2) (d^2) S1 (S2^2) S4+(a^2) (b^2) (c^2) S0 S1 S3 S4+(b^4) (c^2) S0 S1 S3 S4-(a^2) (c^4) S0 S1 S3 S4-(b^2) (c^4) S0 S1 S3 S4+(a^2) (b^2) (d^2) S0 S1 S3 S4+(b^4) (d^2) S0 S1 S3 S4-(a^2) (c^2) (d^2) S0 S1 S3 S4-(b^2) (c^2) (d^2) S0 S1 S3 S4+(a^2) (b^2) (c^2) (S1^2) S3 S4-(b^4) (c^2) (S1^2) S3 S4-(a^2) (c^4) (S1^2) S3 S4+(b^2) (c^4) (S1^2) S3 S4+(a^2) (b^2) (d^2) (S1^2) S3 S4-(b^4) (d^2) (S1^2) S3 S4-(a^2) (c^2) (d^2) (S1^2) S3 S4+(b^2) (c^2) (d^2) (S1^2) S3 S4+(a^2) (b^2) (c^2) S0 S2 S3 S4-(b^4) (c^2) S0 S2 S3 S4+(a^2) (c^4) S0 S2 S3 S4-(b^2) (c^4) S0 S2 S3 S4+(a^2) (b^2) (d^2) S0 S2 S3 S4-(b^4) (d^2) S0 S2 S3 S4+(a^2) (c^2) (d^2) S0 S2 S3 S4-(b^2) (c^2) (d^2) S0 S2 S3 S4+(a^2) (b^2) (c^2) S1 S2 S3 S4+(b^4) (c^2) S1 S2 S3 S4+(a^2) (c^4) S1 S2 S3 S4+(b^2) (c^4) S1 S2 S3 S4+(a^2) (b^2) (d^2) S1 S2 S3 S4+(b^4) (d^2) S1 S2 S3 S4+(a^2) (c^2) (d^2) S1 S2 S3 S4+(b^2) (c^2) (d^2) S1 S2 S3 S4))

FullSimplify[A2]

C2=-((4 E0 S0 ((a^2) (b^2) (c^4) S1 S2 S3+(a^2) (b^2) (c^2) (d^2) S1 S2 S3-(a^2) (b^2) (c^4) S1 (S3^2)+(a^2) (b^2) (c^2) (d^2) S1 (S3^2)+(a^2) (b^2) (c^4) S1 S2 S4-(a^2) (b^2) (c^2) (d^2) S1 S2 S4-(a^2) (b^2) (c^4) S1 S3 S4-(a^2) (b^2) (c^2) (d^2) S1 S3 S4))/((a^2) (b^2) (c^2) S0 S1 S2 S3+(b^4) (c^2) S0 S1 S2 S3+(a^2) (c^4) S0 S1 S2 S3+(b^2) (c^4) S0 S1 S2 S3+(a^2) (b^2) (d^2) S0 S1 S2 S3+(b^4) (d^2) S0 S1 S2 S3+(a^2) (c^2) (d^2) S0 S1 S2 S3+(b^2) (c^2) (d^2) S0 S1 S2 S3+(a^2) (b^2) (c^2) (S1^2) S2 S3-(b^4) (c^2) (S1^2) S2 S3+(a^2) (c^4) (S1^2) S2 S3-(b^2) (c^4) (S1^2) S2 S3+(a^2) (b^2) (d^2) (S1^2) S2 S3-(b^4) (d^2) (S1^2) S2 S3+(a^2) (c^2) (d^2) (S1^2) S2 S3-(b^2) (c^2) (d^2) (S1^2) S2 S3+(a^2) (b^2) (c^2) S0 (S2^2) S3-(b^4) (c^2) S0 (S2^2) S3-(a^2) (c^4) S0 (S2^2) S3+(b^2) (c^4) S0 (S2^2) S3+(a^2) (b^2) (d^2) S0 (S2^2) S3-(b^4) (d^2) S0 (S2^2) S3-(a^2) (c^2) (d^2) S0 (S2^2) S3+(b^2) (c^2) (d^2) S0 (S2^2) S3+(a^2) (b^2) (c^2) S1 (S2^2) S3+(b^4) (c^2) S1 (S2^2) S3-(a^2) (c^4) S1 (S2^2) S3-(b^2) (c^4) S1 (S2^2) S3+(a^2) (b^2) (d^2) S1 (S2^2) S3+(b^4) (d^2) S1 (S2^2) S3-(a^2) (c^2) (d^2) S1 (S2^2) S3-(b^2) (c^2) (d^2) S1 (S2^2) S3+(a^2) (b^2) (c^2) S0 S1 (S3^2)+(b^4) (c^2) S0 S1 (S3^2)-(a^2) (c^4) S0 S1 (S3^2)-(b^2) (c^4) S0 S1 (S3^2)-(a^2) (b^2) (d^2) S0 S1 (S3^2)-(b^4) (d^2) S0 S1 (S3^2)+(a^2) (c^2) (d^2) S0 S1 (S3^2)+(b^2) (c^2) (d^2) S0 S1 (S3^2)+(a^2) (b^2) (c^2) (S1^2) (S3^2)-(b^4) (c^2) (S1^2) (S3^2)-(a^2) (c^4) (S1^2) (S3^2)+(b^2) (c^4) (S1^2) (S3^2)-(a^2) (b^2) (d^2) (S1^2) (S3^2)+(b^4) (d^2) (S1^2) (S3^2)+(a^2) (c^2) (d^2) (S1^2) (S3^2)-(b^2) (c^2) (d^2) (S1^2) (S3^2)+(a^2) (b^2) (c^2) S0 S2 (S3^2)-(b^4) (c^2) S0 S2 (S3^2)+(a^2) (c^4) S0 S2 (S3^2)-(b^2) (c^4) S0 S2 (S3^2)-(a^2) (b^2) (d^2) S0 S2 (S3^2)+(b^4) (d^2) S0 S2 (S3^2)-(a^2) (c^2) (d^2) S0 S2 (S3^2)+(b^2) (c^2) (d^2) S0 S2 (S3^2)+(a^2) (b^2) (c^2) S1 S2 (S3^2)+(b^4) (c^2) S1 S2 (S3^2)+(a^2) (c^4) S1 S2 (S3^2)+(b^2) (c^4) S1 S2 (S3^2)-(a^2) (b^2) (d^2) S1 S2 (S3^2)-(b^4) (d^2) S1 S2 (S3^2)-(a^2) (c^2) (d^2) S1 S2 (S3^2)-(b^2) (c^2) (d^2) S1 S2 (S3^2)+(a^2) (b^2) (c^2) S0 S1 S2 S4+(b^4) (c^2) S0 S1 S2 S4+(a^2) (c^4) S0 S1 S2 S4+(b^2) (c^4) S0 S1 S2 S4-(a^2) (b^2) (d^2) S0 S1 S2 S4-(b^4) (d^2) S0 S1 S2 S4-(a^2) (c^2) (d^2) S0 S1 S2 S4-(b^2) (c^2) (d^2) S0 S1 S2 S4+(a^2) (b^2) (c^2) (S1^2) S2 S4-(b^4) (c^2) (S1^2) S2 S4+(a^2) (c^4) (S1^2) S2 S4-(b^2) (c^4) (S1^2) S2 S4-(a^2) (b^2) (d^2) (S1^2) S2 S4+(b^4) (d^2) (S1^2) S2 S4-(a^2) (c^2) (d^2) (S1^2) S2 S4+(b^2) (c^2) (d^2) (S1^2) S2 S4+(a^2) (b^2) (c^2) S0 (S2^2) S4-(b^4) (c^2) S0 (S2^2) S4-(a^2) (c^4) S0 (S2^2) S4+(b^2) (c^4) S0 (S2^2) S4-(a^2) (b^2) (d^2) S0 (S2^2) S4+(b^4) (d^2) S0 (S2^2) S4+(a^2) (c^2) (d^2) S0 (S2^2) S4-(b^2) (c^2) (d^2) S0 (S2^2) S4+(a^2) (b^2) (c^2) S1 (S2^2) S4+(b^4) (c^2) S1 (S2^2) S4-(a^2) (c^4) S1 (S2^2) S4-(b^2) (c^4) S1 (S2^2) S4-(a^2) (b^2) (d^2) S1 (S2^2) S4-(b^4) (d^2) S1 (S2^2) S4+(a^2) (c^2) (d^2) S1 (S2^2) S4+(b^2) (c^2) (d^2) S1 (S2^2) S4+(a^2) (b^2) (c^2) S0 S1 S3 S4+(b^4) (c^2) S0 S1 S3 S4-(a^2) (c^4) S0 S1 S3 S4-(b^2) (c^4) S0 S1 S3 S4+(a^2) (b^2) (d^2) S0 S1 S3 S4+(b^4) (d^2) S0 S1 S3 S4-(a^2) (c^2) (d^2) S0 S1 S3 S4-(b^2) (c^2) (d^2) S0 S1 S3 S4+(a^2) (b^2) (c^2) (S1^2) S3 S4-(b^4) (c^2) (S1^2) S3 S4-(a^2) (c^4) (S1^2) S3 S4+(b^2) (c^4) (S1^2) S3 S4+(a^2) (b^2) (d^2) (S1^2) S3 S4-(b^4) (d^2) (S1^2) S3 S4-(a^2) (c^2) (d^2) (S1^2) S3 S4+(b^2) (c^2) (d^2) (S1^2) S3 S4+(a^2) (b^2) (c^2) S0 S2 S3 S4-(b^4) (c^2) S0 S2 S3 S4+(a^2) (c^4) S0 S2 S3 S4-(b^2) (c^4) S0 S2 S3 S4+(a^2) (b^2) (d^2) S0 S2 S3 S4-(b^4) (d^2) S0 S2 S3 S4+(a^2) (c^2) (d^2) S0 S2 S3 S4-(b^2) (c^2) (d^2) S0 S2 S3 S4+(a^2) (b^2) (c^2) S1 S2 S3 S4+(b^4) (c^2) S1 S2 S3 S4+(a^2) (c^4) S1 S2 S3 S4+(b^2) (c^4) S1 S2 S3 S4+(a^2) (b^2) (d^2) S1 S2 S3 S4+(b^4) (d^2) S1 S2 S3 S4+(a^2) (c^2) (d^2) S1 S2 S3 S4+(b^2) (c^2) (d^2) S1 S2 S3 S4))

FullSimplify[C2]

A3=-((8 (b^2) (c^2) E0 S0 S2 ((a^2) S1 S3+(a^2) S1 S4))/((a^2) (b^2) (c^2) S0 S1 S2 S3+(b^4) (c^2) S0 S1 S2 S3+(a^2) (c^4) S0 S1 S2 S3+(b^2) (c^4) S0 S1 S2 S3+(a^2) (b^2) (d^2) S0 S1 S2 S3+(b^4) (d^2) S0 S1 S2 S3+(a^2) (c^2) (d^2) S0 S1 S2 S3+(b^2) (c^2) (d^2) S0 S1 S2 S3+(a^2) (b^2) (c^2) (S1^2) S2 S3-(b^4) (c^2) (S1^2) S2 S3+(a^2) (c^4) (S1^2) S2 S3-(b^2) (c^4) (S1^2) S2 S3+(a^2) (b^2) (d^2) (S1^2) S2 S3-(b^4) (d^2) (S1^2) S2 S3+(a^2) (c^2) (d^2) (S1^2) S2 S3-(b^2) (c^2) (d^2) (S1^2) S2 S3+(a^2) (b^2) (c^2) S0 (S2^2) S3-(b^4) (c^2) S0 (S2^2) S3-(a^2) (c^4) S0 (S2^2) S3+(b^2) (c^4) S0 (S2^2) S3+(a^2) (b^2) (d^2) S0 (S2^2) S3-(b^4) (d^2) S0 (S2^2) S3-(a^2) (c^2) (d^2) S0 (S2^2) S3+(b^2) (c^2) (d^2) S0 (S2^2) S3+(a^2) (b^2) (c^2) S1 (S2^2) S3+(b^4) (c^2) S1 (S2^2) S3-(a^2) (c^4) S1 (S2^2) S3-(b^2) (c^4) S1 (S2^2) S3+(a^2) (b^2) (d^2) S1 (S2^2) S3+(b^4) (d^2) S1 (S2^2) S3-(a^2) (c^2) (d^2) S1 (S2^2) S3-(b^2) (c^2) (d^2) S1 (S2^2) S3+(a^2) (b^2) (c^2) S0 S1 (S3^2)+(b^4) (c^2) S0 S1 (S3^2)-(a^2) (c^4) S0 S1 (S3^2)-(b^2) (c^4) S0 S1 (S3^2)-(a^2) (b^2) (d^2) S0 S1 (S3^2)-(b^4) (d^2) S0 S1 (S3^2)+(a^2) (c^2) (d^2) S0 S1 (S3^2)+(b^2) (c^2) (d^2) S0 S1 (S3^2)+(a^2) (b^2) (c^2) (S1^2) (S3^2)-(b^4) (c^2) (S1^2) (S3^2)-(a^2) (c^4) (S1^2) (S3^2)+(b^2) (c^4) (S1^2) (S3^2)-(a^2) (b^2) (d^2) (S1^2) (S3^2)+(b^4) (d^2) (S1^2) (S3^2)+(a^2) (c^2) (d^2) (S1^2) (S3^2)-(b^2) (c^2) (d^2) (S1^2) (S3^2)+(a^2) (b^2) (c^2) S0 S2 (S3^2)-(b^4) (c^2) S0 S2 (S3^2)+(a^2) (c^4) S0 S2 (S3^2)-(b^2) (c^4) S0 S2 (S3^2)-(a^2) (b^2) (d^2) S0 S2 (S3^2)+(b^4) (d^2) S0 S2 (S3^2)-(a^2) (c^2) (d^2) S0 S2 (S3^2)+(b^2) (c^2) (d^2) S0 S2 (S3^2)+(a^2) (b^2) (c^2) S1 S2 (S3^2)+(b^4) (c^2) S1 S2 (S3^2)+(a^2) (c^4) S1 S2 (S3^2)+(b^2) (c^4) S1 S2 (S3^2)-(a^2) (b^2) (d^2) S1 S2 (S3^2)-(b^4) (d^2) S1 S2 (S3^2)-(a^2) (c^2) (d^2) S1 S2 (S3^2)-(b^2) (c^2) (d^2) S1 S2 (S3^2)+(a^2) (b^2) (c^2) S0 S1 S2 S4+(b^4) (c^2) S0 S1 S2 S4+(a^2) (c^4) S0 S1 S2 S4+(b^2) (c^4) S0 S1 S2 S4-(a^2) (b^2) (d^2) S0 S1 S2 S4-(b^4) (d^2) S0 S1 S2 S4-(a^2) (c^2) (d^2) S0 S1 S2 S4-(b^2) (c^2) (d^2) S0 S1 S2 S4+(a^2) (b^2) (c^2) (S1^2) S2 S4-(b^4) (c^2) (S1^2) S2 S4+(a^2) (c^4) (S1^2) S2 S4-(b^2) (c^4) (S1^2) S2 S4-(a^2) (b^2) (d^2) (S1^2) S2 S4+(b^4) (d^2) (S1^2) S2 S4-(a^2) (c^2) (d^2) (S1^2) S2 S4+(b^2) (c^2) (d^2) (S1^2) S2 S4+(a^2) (b^2) (c^2) S0 (S2^2) S4-(b^4) (c^2) S0 (S2^2) S4-(a^2) (c^4) S0 (S2^2) S4+(b^2) (c^4) S0 (S2^2) S4-(a^2) (b^2) (d^2) S0 (S2^2) S4+(b^4) (d^2) S0 (S2^2) S4+(a^2) (c^2) (d^2) S0 (S2^2) S4-(b^2) (c^2) (d^2) S0 (S2^2) S4+(a^2) (b^2) (c^2) S1 (S2^2) S4+(b^4) (c^2) S1 (S2^2) S4-(a^2) (c^4) S1 (S2^2) S4-(b^2) (c^4) S1 (S2^2) S4-(a^2) (b^2) (d^2) S1 (S2^2) S4-(b^4) (d^2) S1 (S2^2) S4+(a^2) (c^2) (d^2) S1 (S2^2) S4+(b^2) (c^2) (d^2) S1 (S2^2) S4+(a^2) (b^2) (c^2) S0 S1 S3 S4+(b^4) (c^2) S0 S1 S3 S4-(a^2) (c^4) S0 S1 S3 S4-(b^2) (c^4) S0 S1 S3 S4+(a^2) (b^2) (d^2) S0 S1 S3 S4+(b^4) (d^2) S0 S1 S3 S4-(a^2) (c^2) (d^2) S0 S1 S3 S4-(b^2) (c^2) (d^2) S0 S1 S3 S4+(a^2) (b^2) (c^2) (S1^2) S3 S4-(b^4) (c^2) (S1^2) S3 S4-(a^2) (c^4) (S1^2) S3 S4+(b^2) (c^4) (S1^2) S3 S4+(a^2) (b^2) (d^2) (S1^2) S3 S4-(b^4) (d^2) (S1^2) S3 S4-(a^2) (c^2) (d^2) (S1^2) S3 S4+(b^2) (c^2) (d^2) (S1^2) S3 S4+(a^2) (b^2) (c^2) S0 S2 S3 S4-(b^4) (c^2) S0 S2 S3 S4+(a^2) (c^4) S0 S2 S3 S4-(b^2) (c^4) S0 S2 S3 S4+(a^2) (b^2) (d^2) S0 S2 S3 S4-(b^4) (d^2) S0 S2 S3 S4+(a^2) (c^2) (d^2) S0 S2 S3 S4-(b^2) (c^2) (d^2) S0 S2 S3 S4+(a^2) (b^2) (c^2) S1 S2 S3 S4+(b^4) (c^2) S1 S2 S3 S4+(a^2) (c^4) S1 S2 S3 S4+(b^2) (c^4) S1 S2 S3 S4+(a^2) (b^2) (d^2) S1 S2 S3 S4+(b^4) (d^2) S1 S2 S3 S4+(a^2) (c^2) (d^2) S1 S2 S3 S4+(b^2) (c^2) (d^2) S1 S2 S3 S4))

FullSimplify[A3]

C3=-((8 (b^2) E0 S0 S2 ((a^2) (c^2) (d^2) S1 S3-(a^2) (c^2) (d^2) S1 S4))/((a^2) (b^2) (c^2) S0 S1 S2 S3+(b^4) (c^2) S0 S1 S2 S3+(a^2) (c^4) S0 S1 S2 S3+(b^2) (c^4) S0 S1 S2 S3+(a^2) (b^2) (d^2) S0 S1 S2 S3+(b^4) (d^2) S0 S1 S2 S3+(a^2) (c^2) (d^2) S0 S1 S2 S3+(b^2) (c^2) (d^2) S0 S1 S2 S3+(a^2) (b^2) (c^2) (S1^2) S2 S3-(b^4) (c^2) (S1^2) S2 S3+(a^2) (c^4) (S1^2) S2 S3-(b^2) (c^4) (S1^2) S2 S3+(a^2) (b^2) (d^2) (S1^2) S2 S3-(b^4) (d^2) (S1^2) S2 S3+(a^2) (c^2) (d^2) (S1^2) S2 S3-(b^2) (c^2) (d^2) (S1^2) S2 S3+(a^2) (b^2) (c^2) S0 (S2^2) S3-(b^4) (c^2) S0 (S2^2) S3-(a^2) (c^4) S0 (S2^2) S3+(b^2) (c^4) S0 (S2^2) S3+(a^2) (b^2) (d^2) S0 (S2^2) S3-(b^4) (d^2) S0 (S2^2) S3-(a^2) (c^2) (d^2) S0 (S2^2) S3+(b^2) (c^2) (d^2) S0 (S2^2) S3+(a^2) (b^2) (c^2) S1 (S2^2) S3+(b^4) (c^2) S1 (S2^2) S3-(a^2) (c^4) S1 (S2^2) S3-(b^2) (c^4) S1 (S2^2) S3+(a^2) (b^2) (d^2) S1 (S2^2) S3+(b^4) (d^2) S1 (S2^2) S3-(a^2) (c^2) (d^2) S1 (S2^2) S3-(b^2) (c^2) (d^2) S1 (S2^2) S3+(a^2) (b^2) (c^2) S0 S1 (S3^2)+(b^4) (c^2) S0 S1 (S3^2)-(a^2) (c^4) S0 S1 (S3^2)-(b^2) (c^4) S0 S1 (S3^2)-(a^2) (b^2) (d^2) S0 S1 (S3^2)-(b^4) (d^2) S0 S1 (S3^2)+(a^2) (c^2) (d^2) S0 S1 (S3^2)+(b^2) (c^2) (d^2) S0 S1 (S3^2)+(a^2) (b^2) (c^2) (S1^2) (S3^2)-(b^4) (c^2) (S1^2) (S3^2)-(a^2) (c^4) (S1^2) (S3^2)+(b^2) (c^4) (S1^2) (S3^2)-(a^2) (b^2) (d^2) (S1^2) (S3^2)+(b^4) (d^2) (S1^2) (S3^2)+(a^2) (c^2) (d^2) (S1^2) (S3^2)-(b^2) (c^2) (d^2) (S1^2) (S3^2)+(a^2) (b^2) (c^2) S0 S2 (S3^2)-(b^4) (c^2) S0 S2 (S3^2)+(a^2) (c^4) S0 S2 (S3^2)-(b^2) (c^4) S0 S2 (S3^2)-(a^2) (b^2) (d^2) S0 S2 (S3^2)+(b^4) (d^2) S0 S2 (S3^2)-(a^2) (c^2) (d^2) S0 S2 (S3^2)+(b^2) (c^2) (d^2) S0 S2 (S3^2)+(a^2) (b^2) (c^2) S1 S2 (S3^2)+(b^4) (c^2) S1 S2 (S3^2)+(a^2) (c^4) S1 S2 (S3^2)+(b^2) (c^4) S1 S2 (S3^2)-(a^2) (b^2) (d^2) S1 S2 (S3^2)-(b^4) (d^2) S1 S2 (S3^2)-(a^2) (c^2) (d^2) S1 S2 (S3^2)-(b^2) (c^2) (d^2) S1 S2 (S3^2)+(a^2) (b^2) (c^2) S0 S1 S2 S4+(b^4) (c^2) S0 S1 S2 S4+(a^2) (c^4) S0 S1 S2 S4+(b^2) (c^4) S0 S1 S2 S4-(a^2) (b^2) (d^2) S0 S1 S2 S4-(b^4) (d^2) S0 S1 S2 S4-(a^2) (c^2) (d^2) S0 S1 S2 S4-(b^2) (c^2) (d^2) S0 S1 S2 S4+(a^2) (b^2) (c^2) (S1^2) S2 S4-(b^4) (c^2) (S1^2) S2 S4+(a^2) (c^4) (S1^2) S2 S4-(b^2) (c^4) (S1^2) S2 S4-(a^2) (b^2) (d^2) (S1^2) S2 S4+(b^4) (d^2) (S1^2) S2 S4-(a^2) (c^2) (d^2) (S1^2) S2 S4+(b^2) (c^2) (d^2) (S1^2) S2 S4+(a^2) (b^2) (c^2) S0 (S2^2) S4-(b^4) (c^2) S0 (S2^2) S4-(a^2) (c^4) S0 (S2^2) S4+(b^2) (c^4) S0 (S2^2) S4-(a^2) (b^2) (d^2) S0 (S2^2) S4+(b^4) (d^2) S0 (S2^2) S4+(a^2) (c^2) (d^2) S0 (S2^2) S4-(b^2) (c^2) (d^2) S0 (S2^2) S4+(a^2) (b^2) (c^2) S1 (S2^2) S4+(b^4) (c^2) S1 (S2^2) S4-(a^2) (c^4) S1 (S2^2) S4-(b^2) (c^4) S1 (S2^2) S4-(a^2) (b^2) (d^2) S1 (S2^2) S4-(b^4) (d^2) S1 (S2^2) S4+(a^2) (c^2) (d^2) S1 (S2^2) S4+(b^2) (c^2) (d^2) S1 (S2^2) S4+(a^2) (b^2) (c^2) S0 S1 S3 S4+(b^4) (c^2) S0 S1 S3 S4-(a^2) (c^4) S0 S1 S3 S4-(b^2) (c^4) S0 S1 S3 S4+(a^2) (b^2) (d^2) S0 S1 S3 S4+(b^4) (d^2) S0 S1 S3 S4-(a^2) (c^2) (d^2) S0 S1 S3 S4-(b^2) (c^2) (d^2) S0 S1 S3 S4+(a^2) (b^2) (c^2) (S1^2) S3 S4-(b^4) (c^2) (S1^2) S3 S4-(a^2) (c^4) (S1^2) S3 S4+(b^2) (c^4) (S1^2) S3 S4+(a^2) (b^2) (d^2) (S1^2) S3 S4-(b^4) (d^2) (S1^2) S3 S4-(a^2) (c^2) (d^2) (S1^2) S3 S4+(b^2) (c^2) (d^2) (S1^2) S3 S4+(a^2) (b^2) (c^2) S0 S2 S3 S4-(b^4) (c^2) S0 S2 S3 S4+(a^2) (c^4) S0 S2 S3 S4-(b^2) (c^4) S0 S2 S3 S4+(a^2) (b^2) (d^2) S0 S2 S3 S4-(b^4) (d^2) S0 S2 S3 S4+(a^2) (c^2) (d^2) S0 S2 S3 S4-(b^2) (c^2) (d^2) S0 S2 S3 S4+(a^2) (b^2) (c^2) S1 S2 S3 S4+(b^4) (c^2) S1 S2 S3 S4+(a^2) (c^4) S1 S2 S3 S4+(b^2) (c^4) S1 S2 S3 S4+(a^2) (b^2) (d^2) S1 S2 S3 S4+(b^4) (d^2) S1 S2 S3 S4+(a^2) (c^2) (d^2) S1 S2 S3 S4+(b^2) (c^2) (d^2) S1 S2 S3 S4))

FullSimplify[C3]

A4=-((16 (a^2) (b^2) (c^2) E0 S0 S1 S2 S3)/((a^2) (b^2) (c^2) S0 S1 S2 S3+(b^4) (c^2) S0 S1 S2 S3+(a^2) (c^4) S0 S1 S2 S3+(b^2) (c^4) S0 S1 S2 S3+(a^2) (b^2) (d^2) S0 S1 S2 S3+(b^4) (d^2) S0 S1 S2 S3+(a^2) (c^2) (d^2) S0 S1 S2 S3+(b^2) (c^2) (d^2) S0 S1 S2 S3+(a^2) (b^2) (c^2) (S1^2) S2 S3-(b^4) (c^2) (S1^2) S2 S3+(a^2) (c^4) (S1^2) S2 S3-(b^2) (c^4) (S1^2) S2 S3+(a^2) (b^2) (d^2) (S1^2) S2 S3-(b^4) (d^2) (S1^2) S2 S3+(a^2) (c^2) (d^2) (S1^2) S2 S3-(b^2) (c^2) (d^2) (S1^2) S2 S3+(a^2) (b^2) (c^2) S0 (S2^2) S3-(b^4) (c^2) S0 (S2^2) S3-(a^2) (c^4) S0 (S2^2) S3+(b^2) (c^4) S0 (S2^2) S3+(a^2) (b^2) (d^2) S0 (S2^2) S3-(b^4) (d^2) S0 (S2^2) S3-(a^2) (c^2) (d^2) S0 (S2^2) S3+(b^2) (c^2) (d^2) S0 (S2^2) S3+(a^2) (b^2) (c^2) S1 (S2^2) S3+(b^4) (c^2) S1 (S2^2) S3-(a^2) (c^4) S1 (S2^2) S3-(b^2) (c^4) S1 (S2^2) S3+(a^2) (b^2) (d^2) S1 (S2^2) S3+(b^4) (d^2) S1 (S2^2) S3-(a^2) (c^2) (d^2) S1 (S2^2) S3-(b^2) (c^2) (d^2) S1 (S2^2) S3+(a^2) (b^2) (c^2) S0 S1 (S3^2)+(b^4) (c^2) S0 S1 (S3^2)-(a^2) (c^4) S0 S1 (S3^2)-(b^2) (c^4) S0 S1 (S3^2)-(a^2) (b^2) (d^2) S0 S1 (S3^2)-(b^4) (d^2) S0 S1 (S3^2)+(a^2) (c^2) (d^2) S0 S1 (S3^2)+(b^2) (c^2) (d^2) S0 S1 (S3^2)+(a^2) (b^2) (c^2) (S1^2) (S3^2)-(b^4) (c^2) (S1^2) (S3^2)-(a^2) (c^4) (S1^2) (S3^2)+(b^2) (c^4) (S1^2) (S3^2)-(a^2) (b^2) (d^2) (S1^2) (S3^2)+(b^4) (d^2) (S1^2) (S3^2)+(a^2) (c^2) (d^2) (S1^2) (S3^2)-(b^2) (c^2) (d^2) (S1^2) (S3^2)+(a^2) (b^2) (c^2) S0 S2 (S3^2)-(b^4) (c^2) S0 S2 (S3^2)+(a^2) (c^4) S0 S2 (S3^2)-(b^2) (c^4) S0 S2 (S3^2)-(a^2) (b^2) (d^2) S0 S2 (S3^2)+(b^4) (d^2) S0 S2 (S3^2)-(a^2) (c^2) (d^2) S0 S2 (S3^2)+(b^2) (c^2) (d^2) S0 S2 (S3^2)+(a^2) (b^2) (c^2) S1 S2 (S3^2)+(b^4) (c^2) S1 S2 (S3^2)+(a^2) (c^4) S1 S2 (S3^2)+(b^2) (c^4) S1 S2 (S3^2)-(a^2) (b^2) (d^2) S1 S2 (S3^2)-(b^4) (d^2) S1 S2 (S3^2)-(a^2) (c^2) (d^2) S1 S2 (S3^2)-(b^2) (c^2) (d^2) S1 S2 (S3^2)+(a^2) (b^2) (c^2) S0 S1 S2 S4+(b^4) (c^2) S0 S1 S2 S4+(a^2) (c^4) S0 S1 S2 S4+(b^2) (c^4) S0 S1 S2 S4-(a^2) (b^2) (d^2) S0 S1 S2 S4-(b^4) (d^2) S0 S1 S2 S4-(a^2) (c^2) (d^2) S0 S1 S2 S4-(b^2) (c^2) (d^2) S0 S1 S2 S4+(a^2) (b^2) (c^2) (S1^2) S2 S4-(b^4) (c^2) (S1^2) S2 S4+(a^2) (c^4) (S1^2) S2 S4-(b^2) (c^4) (S1^2) S2 S4-(a^2) (b^2) (d^2) (S1^2) S2 S4+(b^4) (d^2) (S1^2) S2 S4-(a^2) (c^2) (d^2) (S1^2) S2 S4+(b^2) (c^2) (d^2) (S1^2) S2 S4+(a^2) (b^2) (c^2) S0 (S2^2) S4-(b^4) (c^2) S0 (S2^2) S4-(a^2) (c^4) S0 (S2^2) S4+(b^2) (c^4) S0 (S2^2) S4-(a^2) (b^2) (d^2) S0 (S2^2) S4+(b^4) (d^2) S0 (S2^2) S4+(a^2) (c^2) (d^2) S0 (S2^2) S4-(b^2) (c^2) (d^2) S0 (S2^2) S4+(a^2) (b^2) (c^2) S1 (S2^2) S4+(b^4) (c^2) S1 (S2^2) S4-(a^2) (c^4) S1 (S2^2) S4-(b^2) (c^4) S1 (S2^2) S4-(a^2) (b^2) (d^2) S1 (S2^2) S4-(b^4) (d^2) S1 (S2^2) S4+(a^2) (c^2) (d^2) S1 (S2^2) S4+(b^2) (c^2) (d^2) S1 (S2^2) S4+(a^2) (b^2) (c^2) S0 S1 S3 S4+(b^4) (c^2) S0 S1 S3 S4-(a^2) (c^4) S0 S1 S3 S4-(b^2) (c^4) S0 S1 S3 S4+(a^2) (b^2) (d^2) S0 S1 S3 S4+(b^4) (d^2) S0 S1 S3 S4-(a^2) (c^2) (d^2) S0 S1 S3 S4-(b^2) (c^2) (d^2) S0 S1 S3 S4+(a^2) (b^2) (c^2) (S1^2) S3 S4-(b^4) (c^2) (S1^2) S3 S4-(a^2) (c^4) (S1^2) S3 S4+(b^2) (c^4) (S1^2) S3 S4+(a^2) (b^2) (d^2) (S1^2) S3 S4-(b^4) (d^2) (S1^2) S3 S4-(a^2) (c^2) (d^2) (S1^2) S3 S4+(b^2) (c^2) (d^2) (S1^2) S3 S4+(a^2) (b^2) (c^2) S0 S2 S3 S4-(b^4) (c^2) S0 S2 S3 S4+(a^2) (c^4) S0 S2 S3 S4-(b^2) (c^4) S0 S2 S3 S4+(a^2) (b^2) (d^2) S0 S2 S3 S4-(b^4) (d^2) S0 S2 S3 S4+(a^2) (c^2) (d^2) S0 S2 S3 S4-(b^2) (c^2) (d^2) S0 S2 S3 S4+(a^2) (b^2) (c^2) S1 S2 S3 S4+(b^4) (c^2) S1 S2 S3 S4+(a^2) (c^4) S1 S2 S3 S4+(b^2) (c^4) S1 S2 S3 S4+(a^2) (b^2) (d^2) S1 S2 S3 S4+(b^4) (d^2) S1 S2 S3 S4+(a^2) (c^2) (d^2) S1 S2 S3 S4+(b^2) (c^2) (d^2) S1 S2 S3 S4))

FullSimplify[A4]

/ Step 2: Analytical expressions  for the voltages in all the model area : 0,1,2,3,4. */

V0[r_,θ_]:=-E0 r Cos[θ]+C0/r Cos[θ]

V1[r_,θ_]:=r A1 Cos[θ]+C1/r  Cos[θ]

V2[r_,θ_]:=r A2 Cos[θ]+C2/r Cos[θ]

V3[r_,θ_]:=r A3 Cos[θ]+C3/r Cos[θ]

V4[r_,θ_]:=r A4 Cos[θ]

V0[r,θ]

FullSimplify[%24]

V1[r,θ]

FullSimplify[%26]

V2[r,θ]

FullSimplify[%28]

V3[r,θ]

FullSimplify[%30]

V4[r,θ]

FullSimplify[%32]

/* Step 3: Expression for voltage  (V3) on each side of the axonal membrane */

V3=-((8 (a^2) (b^2) (c^2) E0 S0 S1 S2 ((d^2) (S3-S4)+(r^2) (S3+S4)) Cos[θ])/(r ((b^2) (S0-S1) ((c^2) (S1+S2) ((d^2) (S2+S3) (S3-S4)+(c^2) (S2-S3) (S3+S4))+(b^2) (S1-S2) ((d^2) (S2-S3) (S3-S4)+(c^2) (S2+S3) (S3+S4)))+(a^2) (S0+S1) ((c^2) (S1-S2) ((d^2) (S2+S3) (S3-S4)+(c^2) (S2-S3) (S3+S4))+(b^2) (S1+S2) ((d^2) (S2-S3) (S3-S4)+(c^2) (S2+S3) (S3+S4))))))

r=c

V3out=-((8 (a^2) (b^2) (c^2) E0 S0 S1 S2 ((d^2) (S3-S4)+(r^2) (S3+S4)) Cos[θ])/(r ((b^2) (S0-S1) ((c^2) (S1+S2) ((d^2) (S2+S3) (S3-S4)+(c^2) (S2-S3) (S3+S4))+(b^2) (S1-S2) ((d^2) (S2-S3) (S3-S4)+(c^2) (S2+S3) (S3+S4)))+(a^2) (S0+S1) ((c^2) (S1-S2) ((d^2) (S2+S3) (S3-S4)+(c^2) (S2-S3) (S3+S4))+(b^2) (S1+S2) ((d^2) (S2-S3) (S3-S4)+(c^2) (S2+S3) (S3+S4))))))

FullSimplify[V3out]

r=d

V3in=-((8 (a^2) (b^2) (c^2) E0 S0 S1 S2 ((d^2) (S3-S4)+(r^2) (S3+S4)) Cos[θ])/(r ((b^2) (S0-S1) ((c^2) (S1+S2) ((d^2) (S2+S3) (S3-S4)+(c^2) (S2-S3) (S3+S4))+(b^2) (S1-S2) ((d^2) (S2-S3) (S3-S4)+(c^2) (S2+S3) (S3+S4)))+(a^2) (S0+S1) ((c^2) (S1-S2) ((d^2) (S2+S3) (S3-S4)+(c^2) (S2-S3) (S3+S4))+(b^2) (S1+S2) ((d^2) (S2-S3) (S3-S4)+(c^2) (S2+S3) (S3+S4))))))

FullSimplify[V3in]

/*  Step 4: Transmembrane potential calculaton, which is defined as the difference between V3in and V3out. */

Vm=V3in-V3out

/* Expression of Vm in equation (11). */

FullSimplify[Vm]