0
$\begingroup$

I'm trying to decipher Figure 15.2A on page 442 of this book chapter. It plots the firing rate $\nu$ of a model neuron against its mean current $\mu_c$.

The equation used to calculate the firing rate is

$$ \frac{1}{\nu} = \tau_{ref} + \tau_m\sqrt{\pi}\int_\frac{V_r - V_{ss}}{\sigma_V}^\frac{V_{th} - V_{ss}}{\sigma_V}{e^{x^2}(1 + erf(x))dx}. $$

Here, $\tau_{ref} = 2$ms, $\tau_m = 10$ms, $V_{th}=-50$mV, $V_r=-60$mV, and $\sigma_V$ can be any of 0.1mV, 1mV, and 4 mV.

$V_{ss}$ is elsewhere in the chapter defined as $V_L+\mu_c/g_L$. For this figure, $g_L=20$nS, $V_L=-70$mV, and $\mu_c$ ranges between 0.3 and 0.5nA.

According to the figure, any of the three values for $\sigma_V$ should produce a firing rate $\nu$ of ~80Hz when $\mu_c$ is 0.5nA.

However, when I compute the result numerically, I get for $\nu$ a value too large to be represented in my computer when $\sigma_V$ is 0.1mV, ~300Hz when $\sigma_V$ is 1mV, and ~80Hz only when $\sigma_V$ is 4mV. None of the lines I get when plotting across different values of $\mu_c$ match those in the original figure.

Can anyone else replicate this figure? Am I misinterpreting the integral? Are there any obvious problems with the form of this equation that I'm missing?

EDIT: I've noticed that in this chapter the error function is defined as

$$ erf(x) = 2/\sqrt{\pi}\int_0^xe^{u^2}du. $$

That is, the power of $e$ is $u^2$, not the usual $-u^2$. I'm not sure whether this is a typo. When I use what's written in the paper, my result is even farther off the mark than when I use the error function I'm used to seeing.

$\endgroup$
  • $\begingroup$ Please note that check-my-work questions are generally considered off-topic $\endgroup$ – ACuriousMind Aug 30 '15 at 21:33
  • $\begingroup$ @ACuriousMind fair enough. i guess you guys can close this if you'd like to. do you have any suggestions for editing this to make it on-topic? i guess i could just remove that initial statement in bold. i was thinking that would make my question more appealing to people by making it seem easier to answer. $\endgroup$ – dbliss Aug 30 '15 at 21:34
  • $\begingroup$ Do you want to compute the integral? $\endgroup$ – Oussama Boussif Aug 30 '15 at 22:20
  • $\begingroup$ @OussamaBoussif yeah, that's what's causing me trouble. $\endgroup$ – dbliss Aug 30 '15 at 22:22
  • $\begingroup$ Seeing as how the author refers to $\sigma_V$ as the "effective standard deviation in the voltage", and seeing as how yes, $\mathrm{erf}(x)=c \int e^{-u^2}\mathrm{d}u$. I'd guess that it should be $\int e^{-x^2}(1+\mathrm{erf}(x))\mathrm{d}x$. It could be a typesetting issue because that seems like too big of an error. $\endgroup$ – user12029 Aug 30 '15 at 22:32
1
$\begingroup$

Let $I$ denote our integral:

$$ I=\int{{e}^{x^2}(1+erfi(x))} dx $$

Using IBP:

$$ u=(1+erfi(x))\quad dv={e}^{x^2}dx\\ du=\frac{2}{\sqrt{\pi}} {e}^{x^2}dx \quad v=erfi(x)\frac{\sqrt{\pi}}{2} $$

You get:

$$ I=(1+erfi(x))erfi(x)\frac{\sqrt{\pi}}{2}-\int{erfi(x) {e}^{x^2}dx}\\ I=(1+erfi(x))erfi(x)\frac{\sqrt{\pi}}{2}-\int{erfi(x){e}^{x^2}-{e}^{x^2}dx} +\int{{e}^{x^2}dx}\\ I=(1+erfi(x))erfi(x)\frac{\sqrt{\pi}}{2}-I+\int{{e}^{x^2}dx}\\ 2I=(1+erfi(x))erfi(x)\frac{\sqrt{\pi}}{2}+\frac{\sqrt{\pi}}{2}erfi(x)+C\\ I=\frac{\sqrt{\pi}}{4}erfi(x)(2+erfi(x)) +C $$

Now all you do is subsitute the values.

$\endgroup$
  • $\begingroup$ many thanks! but how do i deal with C? $\endgroup$ – dbliss Aug 30 '15 at 22:43
  • $\begingroup$ @dbliss I used the definition of the $erf(x)$ mentionned in the book but actually the real definition is the one mentionned in the comments $\endgroup$ – Oussama Boussif Aug 30 '15 at 22:45
  • $\begingroup$ @dbliss it will cancel out when calculating the definite integral. You know that: $\int_{a}^{b}{f(x)dx}=F(a)-F(b)$ So there's no need for the constant $\endgroup$ – Oussama Boussif Aug 30 '15 at 22:47
  • $\begingroup$ gotcha, thanks. OK. it does seem that that's a typo in the definition of erf in the book. do you mind updating your answer so that it uses the correct definition of erf? you might keep two versions of your answer, one for each version of erf. $\endgroup$ – dbliss Aug 30 '15 at 22:48
  • $\begingroup$ @dbliss it doesnt matter since its just a name but when calculating the "erf" watch out as you would want to calculate $erfi(x)$ instead. Just use wolfram alpha for numerical application and make sure to use $erfi(x)$ $\endgroup$ – Oussama Boussif Aug 30 '15 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.