Proper way to check convexity or concavity for a function
up vote
4
down vote
favorite
I am working with a function I would like to check if it is convex or concave. The function is the next:
$$f(x_1,x_2)= max{x_1^6,e^{x_1+3x_2^2},3x_1^2-x_1x_2+x_2^4-log(x_2+2)}$$
With $x_2>-2$
I knowusing derivatives I can check for one function but in this case I have a set of functions. How can I check convexity or concavity of this function?
Many thanks!!!
self-study
add a comment |
up vote
4
down vote
favorite
I am working with a function I would like to check if it is convex or concave. The function is the next:
$$f(x_1,x_2)= max{x_1^6,e^{x_1+3x_2^2},3x_1^2-x_1x_2+x_2^4-log(x_2+2)}$$
With $x_2>-2$
I knowusing derivatives I can check for one function but in this case I have a set of functions. How can I check convexity or concavity of this function?
Many thanks!!!
self-study
4
Actually, you have only one function: the max of three different functions.
– Cliff AB
Dec 6 at 20:14
1
Not sure if this is on topic here. Might be better on maths.se
– Robert Long
Dec 6 at 22:01
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I am working with a function I would like to check if it is convex or concave. The function is the next:
$$f(x_1,x_2)= max{x_1^6,e^{x_1+3x_2^2},3x_1^2-x_1x_2+x_2^4-log(x_2+2)}$$
With $x_2>-2$
I knowusing derivatives I can check for one function but in this case I have a set of functions. How can I check convexity or concavity of this function?
Many thanks!!!
self-study
I am working with a function I would like to check if it is convex or concave. The function is the next:
$$f(x_1,x_2)= max{x_1^6,e^{x_1+3x_2^2},3x_1^2-x_1x_2+x_2^4-log(x_2+2)}$$
With $x_2>-2$
I knowusing derivatives I can check for one function but in this case I have a set of functions. How can I check convexity or concavity of this function?
Many thanks!!!
self-study
self-study
edited Dec 6 at 20:08
Cliff AB
12.5k12362
12.5k12362
asked Dec 6 at 20:02
Duck
762
762
4
Actually, you have only one function: the max of three different functions.
– Cliff AB
Dec 6 at 20:14
1
Not sure if this is on topic here. Might be better on maths.se
– Robert Long
Dec 6 at 22:01
add a comment |
4
Actually, you have only one function: the max of three different functions.
– Cliff AB
Dec 6 at 20:14
1
Not sure if this is on topic here. Might be better on maths.se
– Robert Long
Dec 6 at 22:01
4
4
Actually, you have only one function: the max of three different functions.
– Cliff AB
Dec 6 at 20:14
Actually, you have only one function: the max of three different functions.
– Cliff AB
Dec 6 at 20:14
1
1
Not sure if this is on topic here. Might be better on maths.se
– Robert Long
Dec 6 at 22:01
Not sure if this is on topic here. Might be better on maths.se
– Robert Long
Dec 6 at 22:01
add a comment |
2 Answers
2
active
oldest
votes
up vote
5
down vote
Most of the job can be done without using derivatives. Seeing squares and fourth powers suggests that perhaps we have a convex function. Indeed:
$x_1^6$ is clearly convex;
$exp(x_1+3x_2^2)$ is a composition of a convex function $exp(cdot)$ and a sum of convex functions, so that it is also convex;- Checking the Hessian matrix of the third function shows that it also is convex;
- A maximum of convex functions is a convex function.
Thus, $f$ is convex.
add a comment |
up vote
0
down vote
If you want to look at the concavity/convexity of $f$ then you are probably going to have to find the ranges of the argument variables over which each of the sub-functions is the maximising one. This will allow you to write $f$ as a piece-wise continuous function and you can then find its second derivative via ordinary calculus techniques. To do this, define the sub-functions:
$$begin{equation} begin{aligned}
f_1(x_1,x_2) &= x_1^6, \[6pt]
f_2(x_1,x_2) &= e^{x_1+3x_2^2}, \[6pt]
f_3(x_1,x_2) &= 3x_1^2-x_1x_2+x_2^4-log(x_2+2),
end{aligned} end{equation}$$
and define the choice-function:
$$M(x_1,x_2) = begin{cases}
1 & & text{for } f_1(x_1,x_2) > max(f_2(x_1,x_2), f_3(x_1,x_2)), \[6pt]
2 & & text{for } f_2(x_1,x_2) > max(f_1(x_1,x_2), f_3(x_1,x_2)), \[6pt]
3 & & text{otherwise}. \[6pt]
end{cases}$$
Your function can now be written as:
$$f(x_1,x_2) = sum_{m=1}^3 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Hence, at all points other than the boundaries of the changes of $M$, the second-derivative (Hessian matrix) of the function is:
$$nabla^2 f(x_1,x_2) = sum_{m=1}^3 nabla^2 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Each Hessian matrix for the sub-functions can easily be obtained from differentiation of those functions. This now gives you the curvature of your function, expressed in terms of the curvatures of the underlying functions. To implement this to find the curvature at a particular point, you simply have to find the boundaries of the regions demarcating different values of $M$.
Finding the boundaries: I won't do this fully, but I'll get you started. Comparing just the first two of these functions you have:
$$f_1(x_1,x_2) > f_2(x_1,x_2) quad quad iff quad quad |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}).$$
Hence, you have:
$$max(f_1(x_1,x_2), f_2(x_1,x_2)) = begin{cases}
x_1^6 & & text{for } |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}), \[6pt]
e^{x_1+3x_2^2} & & text{for } |x_2| geqslant sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}). \[6pt]
end{cases}$$
If you keep going you can find the boundaries between this function and $f_3$ and you will eventually be able to write conditions for the boundaries of $M$.
1
The problem with this approach is that convexity can fail merely by failing at a single boundary point. For instance, the function $xto x^2+mathbb{I}(xge 0)$ is locally convex almost everywhere in your sense of having a positive-definite Hessian, but nevertheless it's not convex due to that jump at $0.$ "Simply have to find the boundaries" is not an easy problem, either!
– whuber♦
Dec 6 at 23:20
Yes, that's true. I suppose I was just looking at convexity at a single point or over a subregion (i.e., locally). Even with this approach you could falsify concavity/convexity by finding a point that counters it.
– Ben
Dec 6 at 23:22
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
Most of the job can be done without using derivatives. Seeing squares and fourth powers suggests that perhaps we have a convex function. Indeed:
$x_1^6$ is clearly convex;
$exp(x_1+3x_2^2)$ is a composition of a convex function $exp(cdot)$ and a sum of convex functions, so that it is also convex;- Checking the Hessian matrix of the third function shows that it also is convex;
- A maximum of convex functions is a convex function.
Thus, $f$ is convex.
add a comment |
up vote
5
down vote
Most of the job can be done without using derivatives. Seeing squares and fourth powers suggests that perhaps we have a convex function. Indeed:
$x_1^6$ is clearly convex;
$exp(x_1+3x_2^2)$ is a composition of a convex function $exp(cdot)$ and a sum of convex functions, so that it is also convex;- Checking the Hessian matrix of the third function shows that it also is convex;
- A maximum of convex functions is a convex function.
Thus, $f$ is convex.
add a comment |
up vote
5
down vote
up vote
5
down vote
Most of the job can be done without using derivatives. Seeing squares and fourth powers suggests that perhaps we have a convex function. Indeed:
$x_1^6$ is clearly convex;
$exp(x_1+3x_2^2)$ is a composition of a convex function $exp(cdot)$ and a sum of convex functions, so that it is also convex;- Checking the Hessian matrix of the third function shows that it also is convex;
- A maximum of convex functions is a convex function.
Thus, $f$ is convex.
Most of the job can be done without using derivatives. Seeing squares and fourth powers suggests that perhaps we have a convex function. Indeed:
$x_1^6$ is clearly convex;
$exp(x_1+3x_2^2)$ is a composition of a convex function $exp(cdot)$ and a sum of convex functions, so that it is also convex;- Checking the Hessian matrix of the third function shows that it also is convex;
- A maximum of convex functions is a convex function.
Thus, $f$ is convex.
answered Dec 6 at 21:56
Julius
7531611
7531611
add a comment |
add a comment |
up vote
0
down vote
If you want to look at the concavity/convexity of $f$ then you are probably going to have to find the ranges of the argument variables over which each of the sub-functions is the maximising one. This will allow you to write $f$ as a piece-wise continuous function and you can then find its second derivative via ordinary calculus techniques. To do this, define the sub-functions:
$$begin{equation} begin{aligned}
f_1(x_1,x_2) &= x_1^6, \[6pt]
f_2(x_1,x_2) &= e^{x_1+3x_2^2}, \[6pt]
f_3(x_1,x_2) &= 3x_1^2-x_1x_2+x_2^4-log(x_2+2),
end{aligned} end{equation}$$
and define the choice-function:
$$M(x_1,x_2) = begin{cases}
1 & & text{for } f_1(x_1,x_2) > max(f_2(x_1,x_2), f_3(x_1,x_2)), \[6pt]
2 & & text{for } f_2(x_1,x_2) > max(f_1(x_1,x_2), f_3(x_1,x_2)), \[6pt]
3 & & text{otherwise}. \[6pt]
end{cases}$$
Your function can now be written as:
$$f(x_1,x_2) = sum_{m=1}^3 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Hence, at all points other than the boundaries of the changes of $M$, the second-derivative (Hessian matrix) of the function is:
$$nabla^2 f(x_1,x_2) = sum_{m=1}^3 nabla^2 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Each Hessian matrix for the sub-functions can easily be obtained from differentiation of those functions. This now gives you the curvature of your function, expressed in terms of the curvatures of the underlying functions. To implement this to find the curvature at a particular point, you simply have to find the boundaries of the regions demarcating different values of $M$.
Finding the boundaries: I won't do this fully, but I'll get you started. Comparing just the first two of these functions you have:
$$f_1(x_1,x_2) > f_2(x_1,x_2) quad quad iff quad quad |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}).$$
Hence, you have:
$$max(f_1(x_1,x_2), f_2(x_1,x_2)) = begin{cases}
x_1^6 & & text{for } |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}), \[6pt]
e^{x_1+3x_2^2} & & text{for } |x_2| geqslant sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}). \[6pt]
end{cases}$$
If you keep going you can find the boundaries between this function and $f_3$ and you will eventually be able to write conditions for the boundaries of $M$.
1
The problem with this approach is that convexity can fail merely by failing at a single boundary point. For instance, the function $xto x^2+mathbb{I}(xge 0)$ is locally convex almost everywhere in your sense of having a positive-definite Hessian, but nevertheless it's not convex due to that jump at $0.$ "Simply have to find the boundaries" is not an easy problem, either!
– whuber♦
Dec 6 at 23:20
Yes, that's true. I suppose I was just looking at convexity at a single point or over a subregion (i.e., locally). Even with this approach you could falsify concavity/convexity by finding a point that counters it.
– Ben
Dec 6 at 23:22
add a comment |
up vote
0
down vote
If you want to look at the concavity/convexity of $f$ then you are probably going to have to find the ranges of the argument variables over which each of the sub-functions is the maximising one. This will allow you to write $f$ as a piece-wise continuous function and you can then find its second derivative via ordinary calculus techniques. To do this, define the sub-functions:
$$begin{equation} begin{aligned}
f_1(x_1,x_2) &= x_1^6, \[6pt]
f_2(x_1,x_2) &= e^{x_1+3x_2^2}, \[6pt]
f_3(x_1,x_2) &= 3x_1^2-x_1x_2+x_2^4-log(x_2+2),
end{aligned} end{equation}$$
and define the choice-function:
$$M(x_1,x_2) = begin{cases}
1 & & text{for } f_1(x_1,x_2) > max(f_2(x_1,x_2), f_3(x_1,x_2)), \[6pt]
2 & & text{for } f_2(x_1,x_2) > max(f_1(x_1,x_2), f_3(x_1,x_2)), \[6pt]
3 & & text{otherwise}. \[6pt]
end{cases}$$
Your function can now be written as:
$$f(x_1,x_2) = sum_{m=1}^3 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Hence, at all points other than the boundaries of the changes of $M$, the second-derivative (Hessian matrix) of the function is:
$$nabla^2 f(x_1,x_2) = sum_{m=1}^3 nabla^2 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Each Hessian matrix for the sub-functions can easily be obtained from differentiation of those functions. This now gives you the curvature of your function, expressed in terms of the curvatures of the underlying functions. To implement this to find the curvature at a particular point, you simply have to find the boundaries of the regions demarcating different values of $M$.
Finding the boundaries: I won't do this fully, but I'll get you started. Comparing just the first two of these functions you have:
$$f_1(x_1,x_2) > f_2(x_1,x_2) quad quad iff quad quad |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}).$$
Hence, you have:
$$max(f_1(x_1,x_2), f_2(x_1,x_2)) = begin{cases}
x_1^6 & & text{for } |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}), \[6pt]
e^{x_1+3x_2^2} & & text{for } |x_2| geqslant sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}). \[6pt]
end{cases}$$
If you keep going you can find the boundaries between this function and $f_3$ and you will eventually be able to write conditions for the boundaries of $M$.
1
The problem with this approach is that convexity can fail merely by failing at a single boundary point. For instance, the function $xto x^2+mathbb{I}(xge 0)$ is locally convex almost everywhere in your sense of having a positive-definite Hessian, but nevertheless it's not convex due to that jump at $0.$ "Simply have to find the boundaries" is not an easy problem, either!
– whuber♦
Dec 6 at 23:20
Yes, that's true. I suppose I was just looking at convexity at a single point or over a subregion (i.e., locally). Even with this approach you could falsify concavity/convexity by finding a point that counters it.
– Ben
Dec 6 at 23:22
add a comment |
up vote
0
down vote
up vote
0
down vote
If you want to look at the concavity/convexity of $f$ then you are probably going to have to find the ranges of the argument variables over which each of the sub-functions is the maximising one. This will allow you to write $f$ as a piece-wise continuous function and you can then find its second derivative via ordinary calculus techniques. To do this, define the sub-functions:
$$begin{equation} begin{aligned}
f_1(x_1,x_2) &= x_1^6, \[6pt]
f_2(x_1,x_2) &= e^{x_1+3x_2^2}, \[6pt]
f_3(x_1,x_2) &= 3x_1^2-x_1x_2+x_2^4-log(x_2+2),
end{aligned} end{equation}$$
and define the choice-function:
$$M(x_1,x_2) = begin{cases}
1 & & text{for } f_1(x_1,x_2) > max(f_2(x_1,x_2), f_3(x_1,x_2)), \[6pt]
2 & & text{for } f_2(x_1,x_2) > max(f_1(x_1,x_2), f_3(x_1,x_2)), \[6pt]
3 & & text{otherwise}. \[6pt]
end{cases}$$
Your function can now be written as:
$$f(x_1,x_2) = sum_{m=1}^3 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Hence, at all points other than the boundaries of the changes of $M$, the second-derivative (Hessian matrix) of the function is:
$$nabla^2 f(x_1,x_2) = sum_{m=1}^3 nabla^2 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Each Hessian matrix for the sub-functions can easily be obtained from differentiation of those functions. This now gives you the curvature of your function, expressed in terms of the curvatures of the underlying functions. To implement this to find the curvature at a particular point, you simply have to find the boundaries of the regions demarcating different values of $M$.
Finding the boundaries: I won't do this fully, but I'll get you started. Comparing just the first two of these functions you have:
$$f_1(x_1,x_2) > f_2(x_1,x_2) quad quad iff quad quad |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}).$$
Hence, you have:
$$max(f_1(x_1,x_2), f_2(x_1,x_2)) = begin{cases}
x_1^6 & & text{for } |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}), \[6pt]
e^{x_1+3x_2^2} & & text{for } |x_2| geqslant sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}). \[6pt]
end{cases}$$
If you keep going you can find the boundaries between this function and $f_3$ and you will eventually be able to write conditions for the boundaries of $M$.
If you want to look at the concavity/convexity of $f$ then you are probably going to have to find the ranges of the argument variables over which each of the sub-functions is the maximising one. This will allow you to write $f$ as a piece-wise continuous function and you can then find its second derivative via ordinary calculus techniques. To do this, define the sub-functions:
$$begin{equation} begin{aligned}
f_1(x_1,x_2) &= x_1^6, \[6pt]
f_2(x_1,x_2) &= e^{x_1+3x_2^2}, \[6pt]
f_3(x_1,x_2) &= 3x_1^2-x_1x_2+x_2^4-log(x_2+2),
end{aligned} end{equation}$$
and define the choice-function:
$$M(x_1,x_2) = begin{cases}
1 & & text{for } f_1(x_1,x_2) > max(f_2(x_1,x_2), f_3(x_1,x_2)), \[6pt]
2 & & text{for } f_2(x_1,x_2) > max(f_1(x_1,x_2), f_3(x_1,x_2)), \[6pt]
3 & & text{otherwise}. \[6pt]
end{cases}$$
Your function can now be written as:
$$f(x_1,x_2) = sum_{m=1}^3 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Hence, at all points other than the boundaries of the changes of $M$, the second-derivative (Hessian matrix) of the function is:
$$nabla^2 f(x_1,x_2) = sum_{m=1}^3 nabla^2 f_{m}(x_1,x_2) cdot mathbb{I}(M(x_1,x_2) = m).$$
Each Hessian matrix for the sub-functions can easily be obtained from differentiation of those functions. This now gives you the curvature of your function, expressed in terms of the curvatures of the underlying functions. To implement this to find the curvature at a particular point, you simply have to find the boundaries of the regions demarcating different values of $M$.
Finding the boundaries: I won't do this fully, but I'll get you started. Comparing just the first two of these functions you have:
$$f_1(x_1,x_2) > f_2(x_1,x_2) quad quad iff quad quad |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}).$$
Hence, you have:
$$max(f_1(x_1,x_2), f_2(x_1,x_2)) = begin{cases}
x_1^6 & & text{for } |x_2| < sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}), \[6pt]
e^{x_1+3x_2^2} & & text{for } |x_2| geqslant sqrt{max(0, 2 ln|x_1| - tfrac{1}{3} x_1}). \[6pt]
end{cases}$$
If you keep going you can find the boundaries between this function and $f_3$ and you will eventually be able to write conditions for the boundaries of $M$.
answered Dec 6 at 23:16
Ben
20.1k22496
20.1k22496
1
The problem with this approach is that convexity can fail merely by failing at a single boundary point. For instance, the function $xto x^2+mathbb{I}(xge 0)$ is locally convex almost everywhere in your sense of having a positive-definite Hessian, but nevertheless it's not convex due to that jump at $0.$ "Simply have to find the boundaries" is not an easy problem, either!
– whuber♦
Dec 6 at 23:20
Yes, that's true. I suppose I was just looking at convexity at a single point or over a subregion (i.e., locally). Even with this approach you could falsify concavity/convexity by finding a point that counters it.
– Ben
Dec 6 at 23:22
add a comment |
1
The problem with this approach is that convexity can fail merely by failing at a single boundary point. For instance, the function $xto x^2+mathbb{I}(xge 0)$ is locally convex almost everywhere in your sense of having a positive-definite Hessian, but nevertheless it's not convex due to that jump at $0.$ "Simply have to find the boundaries" is not an easy problem, either!
– whuber♦
Dec 6 at 23:20
Yes, that's true. I suppose I was just looking at convexity at a single point or over a subregion (i.e., locally). Even with this approach you could falsify concavity/convexity by finding a point that counters it.
– Ben
Dec 6 at 23:22
1
1
The problem with this approach is that convexity can fail merely by failing at a single boundary point. For instance, the function $xto x^2+mathbb{I}(xge 0)$ is locally convex almost everywhere in your sense of having a positive-definite Hessian, but nevertheless it's not convex due to that jump at $0.$ "Simply have to find the boundaries" is not an easy problem, either!
– whuber♦
Dec 6 at 23:20
The problem with this approach is that convexity can fail merely by failing at a single boundary point. For instance, the function $xto x^2+mathbb{I}(xge 0)$ is locally convex almost everywhere in your sense of having a positive-definite Hessian, but nevertheless it's not convex due to that jump at $0.$ "Simply have to find the boundaries" is not an easy problem, either!
– whuber♦
Dec 6 at 23:20
Yes, that's true. I suppose I was just looking at convexity at a single point or over a subregion (i.e., locally). Even with this approach you could falsify concavity/convexity by finding a point that counters it.
– Ben
Dec 6 at 23:22
Yes, that's true. I suppose I was just looking at convexity at a single point or over a subregion (i.e., locally). Even with this approach you could falsify concavity/convexity by finding a point that counters it.
– Ben
Dec 6 at 23:22
add a comment |
Thanks for contributing an answer to Cross Validated!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f380717%2fproper-way-to-check-convexity-or-concavity-for-a-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
Actually, you have only one function: the max of three different functions.
– Cliff AB
Dec 6 at 20:14
1
Not sure if this is on topic here. Might be better on maths.se
– Robert Long
Dec 6 at 22:01