Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a function that is inversely proportional for positive numbers and directly proportional for negative numbers. The positive and negative can be swapped but the importnat thing is that they are in the same scale. Is there any such function?

share|cite|improve this question
I have no idea what you are asking. Inversely proportional to what? – copper.hat Feb 26 '13 at 17:58
Is there something wrong with the function: $$f(x)=\begin{cases}\frac{k}{x} & x > 0 \\ 0 & x = 0 \\ kx & x < 0\end{cases}$$ – Shaktal Feb 26 '13 at 18:01

Easiest way $$ f(x) = \left \{ \begin{array}{ll} \frac mx & x > 0 \\ kx & x \le 0 \end{array}\right . $$

You also can use Heaviside step function $H(x)$ $$ f(x) = \left \{ \begin{array}{ll} \frac mx H(x) + kx H(-x) & x \ne 0 \\ 0 & x = 0 \end{array}\right . $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.