# 1.2: Chapter 1 Exercises

- Page ID
- 21799

Question \(\PageIndex{1}\)

In order to refresh your matrix-vector multiply skills please calculate, by hand, the product \(A^{T}GA\) in the 3 compartment case and write out the 4 equations in the vector equation we arrived at in step(S4): \(A^{T}GA \textbf{x} = \textbf{f}\)

**Feedback**

The second equation should read

\[\frac{-x_{1}+2x_{2}-x_{3}}{R_{i}}+\frac{x_{2}}{R_{m}} = 0 \label{1.2.1}\]

Question \(\PageIndex{2}\)

We began our discussion with the 'hope' that a multicompartment model could indeed adequately capture the fiber's true potential and current profiles. In order to check this one should run fib1.m with increasing values of NN until one can no longer detect changes in the computed potentials.

- (a) Please run fib1.m with \(N = 8, 16, 32\), and 64. Plot all of the potentials on the
**same**(use`hold`

) graph, using different line types for each. (You may wish to alter`fib1.m`

so that it accepts NN as an argument).

Let us now interpret this convergence. The main observation is that the difference Equation \ref{1.2.1}, approaches a differential equation. We can see this by noting that

\[\mathbb{d}(z) = \frac{l}{N}\]

acts as a spatial 'step' size and that \(x_{k} \mathbb{d}(z)\) is approximately the value of the true potential at \((k-1) \mathbb{d}(z)\). In a slight abuse of notation, we denote the latter

\[x((k-1) \mathbb{d}(z))\]

Applying these conventions to Equation \ref{1.2.1} and recalling the definitions of \(R_{i}\) and \(R_{m}\) we see Equation \ref{1.2.1} become

\[\frac{\pi a^2}{\rho_{i}} \frac{-x(0)+2x(\mathbb{d}(z))-x(2 \mathbb{d}(z))}{\mathbb{d}(z)}+ \frac{2 \pi a \mathbb{d}(z)}{\rho_{m}} x(d(z)) = 0\]

or, after multiplying through by \(\frac{\rho_{m}}{\pi a \mathbb{d}(z)}\)

\[\frac{a \rho_{m}}{\rho_{i}} \frac{-x(0)+2x(\mathbb{d}(z))-x(2\mathbb{d}(z))}{\mathbb{d}(z^2)}+2x(\mathbb{d}(z)) = 0 \label{1.2.3}\]

We note that a similar equation holds at each node (save the ends) and that as \(N \rightarrow \infty\) and therefore \(\mathbb{d}(z) \rightarrow 0\) we arrive at

\[\frac{d^2}{dz^2} x(z)-\frac{2\rho_{i}}{a \rho_{m}} x(z) = 0 \label{1.2.4}\]

- (b) With \(\mu \equiv \frac{2\rho_{i}}{a \rho_{m}}\) show that

\[x(z) = \alpha \sinh(\sqrt{2 \mu} z)+\beta \cosh(\sqrt{2 \mu}z) \label{1.2.5}\]

satisfies Equation \ref{1.2.3} regardless of \(\alpha\) and \(\beta\)

We shall determine \(\alpha\) and \(\beta\) by paying attention to the ends of the fiber. At the near end we find

\[\frac{\pi a^2}{\rho_{i}} \frac{x(0)-x(\mathbb{d}(z))}{\mathbb{d}(z)} = i_{0}\]

which, as \(\mathbb{d}(z) \rightarrow 0\) becomes

\[\frac{d}{dz} x(0) = -\frac{\rho_{i} i_{0}}{\pi a^{2}}\]

At the far end, we interpret the condition that no axial current may leave the last node to mean

\[\frac{d}{dz} x(l) = 0\]

- (c) Substitute Equation \ref{1.2.4} into Equation \ref{1.2.5} and solve for \(\alpha\) and \(\beta\) and write out the final \(x(z)\).
- (d) Substitute into \(x\) the \(l, a, \rho_{i}, \rho_{m}\) values used in fib1.m, plot the resulting function (using, e.g.,
`ezplot`

) and compare this to the plot achieved in part (a).