finding a function consisting of two variables

45 Views Asked by At

Some context beforehand:- I was writing an expression for force between two charges with two mediums placed in between them. I noticed that the deviation of the force I calculated to be varying by a constant factor at particular distances from the actual value of force.

I know the expression for the actual force but I wanted to take this opportunity to learn a way of finding what the expression for that factor would be knowing their magnitudes at 2 different distances. That leads me to this question where r is the distance between them and t is the distance covered by another medium.

I need to find a function $f(r,t)$ such that

$$f(r,t) = \begin{cases} 2, & t=\frac{r}{2},& r\ge t>0\\ r, & t=r, & r\ge t>0\\ \end{cases}$$

The question really is straightforward but I don't have any mathematical approach to this so in reality I just wasted an hour manually trying out different possible functions. can someone tell me how I can conclusively find the function or disprove the existence of the function?

I wrote several functions such as $2+t(2-\frac{4}{r})$, $\frac{4r}{t+r}$, $\frac{r}{r-t}$

I don't see the point of writing more but ultimately I still couldn't find any function that fulfills both the conditions.

p.s- hope the formatting is better this time.

1

There are 1 best solutions below

2
On BEST ANSWER

Let, $$f(r,t)=2\sin\left(\frac{t}{r}\pi\right)+r\sin\left(\frac{t}{r}\pi-\frac{1}{2}\pi\right)$$

Then, \begin{align} f(r,r/2)&=2\sin\left(\frac{r/2}{r}\pi\right)+r\sin\left(\frac{r/2}{r}\pi-\frac{1}{2}\pi\right)\\ &=2\sin\left(\frac{1}{2}\pi\right)+r\sin\left(\frac{1}{2}\pi-\frac{1}{2}\pi\right)\\ &=2\sin\left(\frac{\pi}{2}\right)+r\sin\left(0\right)\\ &=2\cdot1+r\cdot0\\ &=2 \end{align} and, \begin{align} f(r,r)&=2\sin\left(\frac{r}{r}\pi\right)+r\sin\left(\frac{r}{r}\pi-\frac{1}{2}\pi\right)\\ &=2\sin\left(\pi\right)+r\sin\left(\pi-\frac{1}{2}\pi\right)\\ &=2\sin\left(\pi\right)+r\sin\left(\frac{\pi}{2}\right)\\ &=2\cdot 0+r\cdot1\\ &=r \end{align} as required.