[Math] how to find point where two exponential type functions intersect

functionsnonlinear systemproblem solving

I have two functions who intersect each other and i want to find time at which they intersect.

The two functions are,

$\left(1-\frac{1}{\text{X2}}\right)-\frac{(\text{X1}-1) (\text{X2}-1)}{e^{4 t \left(\frac{1}{\text{X2}}-1\right)} (\text{X2}-\text{X1})+(\text{X1}-1) \text{X2}}$

and

$\frac{(\text{X1}-1) (\text{X2}-1)}{e^{4 t \left(\frac{1}{\text{X1}}-1\right)} (\text{X1}-\text{X2})+\text{X1} (\text{X2}-1)}-\left(1-\frac{1}{\text{X1}}\right)$

If i plot them they look like this for one chosen set of parameters,

enter image description here

Please help.

Thanks,

Nitin

PS: i am trying to quantify hysteresis behavior between two functions and hence one way i thought is to find area under the curve but to find absolute area under the curve is not possible with these functions(I guess) hence if i can find the point of intersection i can do an integration till that time and find out the positive area.

Any other suggestion about how one can study and quantify hysteresis for such functions will be highly useful for me.

Best Answer

I am not sure to understand the problem and I wait for an answer to my comment (is there any relation between $x_1$ and $x_2$ ? are they bounded ?)

Your PS write

I am trying to quantify hysteresis behavior between two functions and hence one way i thought is to find area under the curve but to find absolute area under the curve is not possible with these functions(I guess) hence if i can find the point of intersection i can do an integration till that time and find out the positive area.

In fact, if $$f_1(t)=-\frac{({x_1}-1) ({x_2}-1)}{e^{4 t \left(\frac{1}{{x_2}}-1\right)} ({x_2}-{x_1})+({x_1}-1) {x_2}}-\frac{1}{{x_2}}+1$$ $$f_2(t)=\frac{({x_1}-1) ({x_2}-1)}{e^{4 t \left(\frac{1}{{x_1}}-1\right)} ({x_1}-{x_2})+{x_1} ({x_2}-1)}+\frac{1}{{x_1}}-1$$ you can integrate these functions and get $$\int f_1(t)~dt=-\frac{1}{4} \log \left(e^{4 t \left(\frac{1}{{x_2}}-1\right)} ({x_1}-{x_2})-{x_1} {x_2}+{x_2}\right)$$ $$\int f_2(t)~dt=\frac{1}{4} \log \left(e^{4 t \left(\frac{1}{{x_1}}-1\right)} ({x_1}-{x_2})+{x_1} {x_2}-x_1\right)$$

Added later to this answer

Since there is no relation between $x_1$ and $x_2$ and the only thinh we know is that they are positive, I do not think that there is any way to find the solution of $$F(t)=f_1(t)-f_2(t)=0$$ and numerical methods are then required.

You should notice that $F(0)=0$ so we have to search for the second root. We also know that $$F'(0)=\frac{4 ({x_1}-{x_2})^2}{{x_1}^2 {x_2}^2} \gt 0$$ so $F(t)$ will start increasing. So, what I should do is to compute in a loop the value of $F(t)$ until two values $t_1$ and $t_1+\Delta t$ be such that $$F(t_1) \times F(t_1+\Delta t) \lt 0$$ From here, we could start a Newton procedure for solving $F(t)=0$. Using the results of the previous search, iterations could start at $$t_0=t_1- \frac{F(t_1)~~ \Delta t}{F(t_1+\Delta t) -F(t_1)}$$

I must confess that I have no idea about the next thing I am writing : if you develop $F(t)$ as a Taylor series at $t=0$, you find $$F(t)=\frac{4 t ({x_1}-{x_2})^2}{{x_1}^2 {x_2}^2}-\frac{16 t^2 \left(({x_1}-{x_2})^2 ({x_1} (2 {x_2}-1)-{x_2})\right)}{{x_1}^3 {x_2}^3}+O\left(t^3\right)$$ which shows a solution at $$t=\frac{{x_1} {x_2}}{4 (2 {x_1} {x_2}-{x_1}-{x_2})}$$

Related Question