How to find inverse of $y = x C_1 + \tan^{-1}(x + rh) + C_2$?

79 Views Asked by At

I have a function as below for which inputs are x, and rh. $C_i$ are constants.

$$ y = x C_1 + \tan^{-1}(x + rh) + C_2 \tag{1} $$

Now, given y, I need to find x. I could not find any relation in arctan that could help me here. Kindly help.

Background: I am trying to reverse the stull's formula to find dry bulb temperature, given wet bulb temperature and relative humidity. Eq(1) is simplified form of stull's formula.

If I take $u = y - C_2, v = x, D = rh$ then I get, via tangent simplification,

$$ u = \dfrac{v(1+C_1) + D}{1 - vC_1(v - D)} \tag{2} $$

where I am still lost, because I need to find $v$ for given $u$, but (2) is other way round.

2

There are 2 best solutions below

2
On

If $C_1$ and $C_2$ are known:

We have $y-xC_1-C_2=\arctan(x+rh)$. Now using the fact that $\tan(\arctan x) = x$ for all real $x$, we can simplify to reach a form where we can apply a Taylor approximation:

Since you are given $y$ and $C_2$, you only have something in the form $\tan(xa+b)$. Using the fact that $\tan(-x) = -\tan(x)$ and the addition formula for tangent:

$$x = \tan(y-xC_1 - C_2) +rh$$ $$= -\tan(-y+xC_1+C_2) + rh$$ $$= -\tan\big((-y+C_2) + xC_1 \big) + rh$$

and now you can use the Taylor series approximation given by Wolfram Alpha:

$$x \approx \tan b + rh + a \sec^2 b + a^2 \tan b \sec^2 b + O(a^3)$$

0
On

Since, from comments, you seem to be concerned by a rather narrow range for $T$, what you could do is to expand the rhs of the equation $$y = C_1 T + \tan^{-1}(T + rh) + C_2$$ as a Taylor series at the midpoint (say at $T=T_{mid}$).

This would give $$y=\left(C_1T_{mid} +\tan ^{-1}(T_{mid}+rh)+C_2\right)+(T-T_{mid}) \left(\frac{1}{(T_{mid}+rh)^2+1}+C_1\right)+O\left((T-T_{mid})^2\right)$$