0

Very abstractly suppose that the number of tokens I buy depends on the formula

$Y_{input} = \sqrt{200000x} - 10 000$

the amount that goes out for the same $x$ somewhere else is

$Y_{output} = 16 853 - \frac{500 000}{50.15-\sqrt{\frac{200000}{x}}}$

In order to have the best profit the difference between $Y_{output}$ and $Y_{input}$ must be the biggest possible on a specified interval. ($Y_{output}-Y_{input} >>> 0$)

Suppose I have an interval of $500$ to $550$ for $x$, how do I find the biggest difference between those two functions in those intervals ?

Is there a way to generalize this ?

Also is true that the biggest difference will be at the end of this interval, so when $x = 550$ ?

meta_warrior
  • 3,288
  • 18
  • 34
qubitz
  • 129
  • 2
    Welcome to MSE. Please use MathJax to format math on this site. To begin with, enclose all math expressions (including numbers) in $ signs. For example, $x_1^2$ will give you $x_1^2$. You'll get a much better response if your posts are easy to read. – saulspatz Jul 15 '21 at 22:08
  • Compute $f(x) = Yinput-Youtput$ and optimize over that. – David G. Stork Jul 15 '21 at 22:21
  • If the function $Y_{diff} = Y_{input}-Y_{output}$ is differentiable in the interval you're interested in, then you can calculate the derivative of $Y_{diff}$ to find the possible stationary points inside the interval, after that you can compare them with the value of the function at the boundaries of the interval and you are done – Tortar Jul 16 '21 at 00:35

0 Answers0