0
$\begingroup$

When creating an equation is there any way to let someone know that if this number doesn't fit into this then use this other equation? Ex: $x>1$ then use $x+y$, or if $x<1$ then use $x-y$. Or do you just have to find an equation that works for both probability?

$\endgroup$
1
  • $\begingroup$ here is another example, this is an equation i created to find how many square in the square aren't touching other squares Example: 2*2*2 square only has 4 sqaures that have two sides not touching another block and 8 squares that have 3 sides not touching a block. Equation: for 0sides $\endgroup$
    – Matt Kemp
    Sep 25, 2014 at 22:18

4 Answers 4

5
$\begingroup$

Like this:

$$ f(x,y)=\begin{cases} x+y & X>1 \\ x-y & X<1 \end{cases} $$

$\endgroup$
0
$\begingroup$

Yes, you can set up a function like this. For example, like this:

$f(x,y) =\,$ for $x>1\,$ use $x+y\,$ and for $x<1\,$ use $x-y$

$\endgroup$
0
$\begingroup$

A good example is the Kronecker delta.

$\endgroup$
0
$\begingroup$

You could also say $f(x,y) = x + \frac{x-1}{|x-1|}y$ for your particular example.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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