Take the 2-minute tour ×
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.

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|improve this question
1  
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

1 Answer 1

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|improve this answer

Your Answer

 
discard

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.