1

This is a question related to my previous question but due to wrong formulated my question I would like to re-post and not only edit since it was solved for the first time after I put 200 bounty points but I saw that it was edited to be solvable.

Linear approximation for an implicit function

This is a function that I would like to find what is $t_r(\mu)$.

Suppose $\mu \in (0,1/2]$ and $r \leq \frac12$, then: $$F(r,\mu,t)=r- \frac{2\mu\left ( \dfrac{e^t(t-1)+1}{t^2} \right )}{(1-2\mu)+2\mu \left ( \dfrac{e^t-1}{t} \right )}=0$$ This is numerical solution of $t_r(\mu)$ and the code that I used to find numerical values of $t$.

The reason why I write $t$ subscript $\mu$ is that $r$ it can be more clear from code that I wrote in Python to solve it (where $r$ in code is $R1$):

import numpy as np
import math
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import fsolve
from itertools import chain
from math import exp 
np.random.seed(2)

n = 100
mu, sigma = 0.5, 0.01 # mean and standard deviation
s = np.random.normal(mu, sigma, n)

R1 = np.mean(s)
MU1 = np.arange(0.0001, 0.5, 0.00001)

t_initial_guess = 10
t_solution1 = []
for mu in MU1:
    if mu <= R1:
        func = lambda t: R1 - (2*mu*((t-1)*math.exp(t) + 1)/(t**2 + 
                         2*mu*t*(math.exp(t) - 1 - t))) 
        t_solution1.append(fsolve(func, t_initial_guess))

Numerical Solution of t

Any good linear approximation of $t_r(\mu)$ that would give me a close value of $t$ would be extremely helpful for me.

Melina
  • 937

0 Answers0