Plot function with integral: find the right formula

47 Views Asked by At

How can I plot a function like this?

enter image description here

Where $N_\mathrm{A,0}$ is constant. For now, let's leave out the details: I just want to know what equation I should write as the argument of the \addplot command in $\LaTeX$ TiKz pgfplots.

My attempt: solve the integral

$$ t = N_\mathrm{A,0} \int_0^{X_\mathrm{A,f}} \dfrac{d X_\mathrm{A}}{r_\mathrm{A} V} $$

$$ t = N_\mathrm{A,0} \dfrac{1}{r_\mathrm{A} V} X_\mathrm{A,f}$$

make explicit with respect to $\dfrac{1}{r_\mathrm{A} V}$

$$\dfrac{1}{r_\mathrm{A} V} = \dfrac{t}{N_\mathrm{A,0}} \dfrac{1}{X_\mathrm{A,f}}$$

this formula can be traced back to the form $y = 1 / x$, and as we know this formula returns the branch of a hyperbola, which is not what I want to get

Any idea?

1

There are 1 best solutions below

0
On BEST ANSWER

To produce a plot like the one you have attached:

Experimentally: Do an experiment where you have fixed solution volume, $V$. Measure concentration of $A$ at fixed times $t_i$. If you know what should be equilibrium concentration of $A$, then you can calculate percent converion at each of these times. Next, numerically differentiate the data at each time $t_i$. Now, you have two plots: Conversion vs time and rate vs time. Since the times are the same between both data sets, take each rate value $r_a(t_i)$ and compute $1/(r_a(t_i)V)$. Find the conversion at the corresponding time $X_A(t_i)$. Plot the point $(1/(r_a(t_i)V),X_A(t_i))$ for each time $t_i$. This should give you the desired plot.

Mathematically: As to the nature of the curve in the plot, I would like to suggest that it is a rational function of conversion. For example, conversion could take the form $$X_A(t) \sim 1-e^{-t},$$ and reaction rate could take the form $$r_A(t) \sim e^{-t}.$$

Now, note that $$\frac{1}{r_A} \sim e^t = e^t(1-e^{-t})+1 = e^tX_A+1 = \frac{-1}{X_A-1}X_A+1 = 1+\frac{X_A}{1-X_A}.$$

So, I would say, use the general form $$y = \frac{ax}{1-x}+1$$ for your plot, and tweak $a$ so that it looks as flat near $0$ as you wish.

enter image description here