I'm struggling to linearize this non-differentiable function as follows: $y = x - 2 $ where $y = 0 $ if $ x- 2 \le 0$ otherwise $y = x-2$ x is a continuous variable with bounds $[0,6]$ and thus y is bounded to continuous region $[0,4]$
In a linear program, I have a variable $y$ that must obey $y=\max(x-a,0)$ where $x$ is a linear combination of the other variables and $a$ is a constant. $x$ and $y$ and $a$ are always non-negative. If the objective function decreases w.r.t. $y$, then adding the constraint $y\geq x-a$ makes it work. Are there any way to add dummy varibles and contraints such that $y=\max(x-a,0)$ when the objective function increases w.r.t. $y$? I can't say $y\leq x-a$ because if $x-a&lt;0$ it contradicts the non-negativity of $y$ whereby the solution might no longer be in the feasible region or the problem might even be infeasible.
Categorical Quotient and group actions I am trying to practice calculating categorical quotients and I ran into this example. I am unable to get the answer and was wondering if someone can help?  Let $G = Z/3Z =$ $\{1, \omega, \omega^2\}$, where $\omega$ is a cube root of unity. Let $G$ act on $𝔸^{2}$ via $\omega(x, y) = (\omega x, \omega y)$. Find the categorical quotient of $𝔸^{2}$ by G. Decode Base64 data in Java I have an image that is Base64 encoded. What is the best way to decode that in Java? Hopefully using only the libraries included with Sun Java 6. Why was the Triwizard Cup used as the portkey? please I tried to find counterexamples to see that $l^p$ is not norm with $p&lt;1$ in the triangle inequality but I have problems with convergence when I choose some successions. Thanks. Calculating half derivative of $x$ using Cauchy's repeated integral formula As far as I know, Cauchy's repeated integral formula is defined as: $$(I^nf)(t)=\frac{1}{\Gamma(n)}\int_a^x (x-t)^{n-1}\space f(t)\space\space dt,\space\space n\notin Z_{\le 0}$$  I know that Gamma function is not defined for negative integers and $0$. I also know that differentiation and integration are inverse operators so I thought of finding $\frac{-1}{2}$th antiderivative of $f(x)=x$ so that I can find the half derivative of $x$. However it seems that it does not work. What is the problem with this? Am I missing something or is it not possible? I know some other ways of finding half derivative of $x$, so what I am asking is the problem about what I tried.  My attempt: $$\frac{1}{\Gamma\left(-\frac{1}{2}\right)} \int^x_0(x-t)^{-\frac{3}{2}}\space t\space dt=\frac{x}{2\sqrt{\pi}}\int^0_x u^{-\frac{3}{2}}\space (x-u)\space du$$  This definite integral is divergent and so I cannot get to a result. Why does an overridden function in the derived class hide other overloads of the base class? How to select lenses for outdoor sports photography? I would like to get into sports photography, and would probably want a better telephoto lens so I can get better close up shots.  What other factors should I keep in mind as I make my choice? Does IS (or VR) matter?  What is a good focal length?  I'll probably be shooting mostly little league baseball/softball, church softball leagues, and kids soccer. The  was observed, giving us the frequency and amplitude of the event. Because LIGO has two detectors a  could be derived.  But how do these three factors allow for the mass of the black holes and their distance to be calculcated? If the wave strengths are in a square relationship to distance, then couldn't there be an infinite number of other masses and distances which would give the same signals? Finding $\int \frac{dx}{a+b \cos x}$ without Weierstrass substitution. I saw somewhere on Math Stack that there was a way of finding integrals in the form $$\int \frac{dx}{a+b \cos x}$$ without using Weierstrass substitution, which is the usual technique.   When $a,b=1$ we can just multiply the numerator and denominator by $1-\cos x$ and that solves the problem nicely.   But I remember that the technique I saw was a nice way of evaluating these even when $a,b\neq 1$. How do I increase my code coverage, or why can't I cover these lines? This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered? $-1$ is a quadratic residue modulo $p$ if and only if $p\equiv 1\pmod{4}$ I came across this problem and I believe Lagrange's theorem is the key to its solution.  The question is:     Let $p$ be an odd prime. Prove that there is some integer $x$ such that $x^2 \equiv −1 \pmod p$ if and only if $p \equiv 1 \pmod 4$.   I appreciate any help.  Thanks. Why are we limited to six questions per day? Is there a higher register word that means to criticize something highly specific and inconsequential? Any synonym I can think of seems a little too vernacular, e.g. "to split hairs", "to nitpick". What's a more professional/academic way of saying this? I'd prefer a single word if one exists. If $f$ is a concave function and $f(0) \geq 0$ then $f(a+b) \leq f(a) + f(b)$ for all $a,b >0$ Find the representing matrix with the respect to the standard basis Let $\Bbb R^2$ be a finite-dimensional vector space and $T:\mathbb{R}^2\to \mathbb{R}^2$ a linear operator. Let $[T]_B =  \begin {bmatrix}0 &amp; 0 \\-1 &amp; 1 \end{bmatrix} $ be a matrix representation of $T$ in the basis $B= (1,1),(-1,0)$.   How can I find the matrix $[T]_E$ where $E$ is the standard basis $(1,0),(0,1)$ if the transformation isn't given in the question?  Thanks,  Alan Does "the same number of people" behave as singular or plural? For me, it is pretty clear that $a + \overline{a}*b = a + b$, because the first $a$ in the or will make sure that if the second term must be 'evaluated', $a$ will always be false, and therefore won't matter in the and - probably because I'm a programmer and it is very common to see this unnecessary cluttering in long if-else structures.  I can easily prove it with the truth table as well, just make both expressions', and turns out they are identical.  But I was looking for a 'algebraic' way to prove it. That is, something using the basic operations properties like the fact that they are transitive, commutative, associative, etc. For example, if I was to prove this other simple identity $a + a*b = a$ I would simply do something like:  $a + a*b = a*(1 + b) = a*1 = a$.  Is there a way to also prove the former using this algebraic operations, without resorting to the truth table? I have a NOPASSWD line in /etc/sudoers (edited with visudo)  gatoatigrado    ALL=(ALL) NOPASSWD: /bin/set-slow-cpufreq   However, the output is,  gatoatigrado@coral:~&gt; sudo -n /bin/set-slow-cpufreq sudo: sorry, a password is required to run sudo   This kind of command works on an OpenSuSE machine, but not on Ubuntu 11.10. What am I doing wrong?  Note: I cannot find any relevant system log messages, e.g. via tail -f /var/log/syslog.  edit  Here is /etc/sudoers.  Defaults    env_reset  # things I've tried copying from an opensuse machine Defaults always_set_home Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"  root    ALL=(ALL:ALL) ALL gatoatigrado ALL=NOPASSWD: /bin/set-slow-cpufreq %admin ALL=(ALL) ALL %sudo   ALL=(ALL:ALL) ALL The latest updates (4/1/2018) make my laptop constantly crash the GUI/Unity:  (Intel Pentium su4100 processor)  syslog:  Jan  5 11:38:53 1810 kernel: [ 1850.327738] compiz[11911]: segfault at 0 ip 00007f6c7baf0c16 sp 00007ffd5ec71c60 error 4 in i965_dri.so[7f6c7b513000+82d000]   After login I end up with an empty desktop, just a wallpaper, GUI/Unity are in a crash loop:   No panel.  No dash.  Can't start a program. Launcher disappears. Sidebar disappears. System crash. Windows key not working. The key combination Alt+Tab not working.   Simply, the computer is not usable. Same for guest login. The only thing working: open up a terminal CTRL+ALT+T to examine log files.  I somehow forced  to let me log in and file the bug, but still lots of problems:   Dash not working Alt+Tab not working Sometimes windows all disappear for a few seconds     Any ideas for a solution or workaround?   UPDATE     If you have the same/ very similar problems, follow the link to my    report and mark there that you're affected too. Or file your own. Please leave a comment   if you wish, or upvote - this is a nasty problem - but an answer should   offer a fix or a workaround so users can use their computer again.    Without , Ubuntu can't fix issues. Scala Lists of lists of integers