Derivative of max function
$begingroup$
I was just wondering what the derivative of $f(x) = max(0,1-x)^{2}$ would be. What technique do you use to determine this derivative?
calculus
$endgroup$
add a comment |
$begingroup$
I was just wondering what the derivative of $f(x) = max(0,1-x)^{2}$ would be. What technique do you use to determine this derivative?
calculus
$endgroup$
3
$begingroup$
Don't you mean $max(0, (1-x)^2)$?
$endgroup$
– Javier
Apr 21 '13 at 19:05
2
$begingroup$
since $(1-x)^2 ge 0 $ (for x a real number), $max(0,(1-x)^2)$ is equal to $(1-x)^2$
$endgroup$
– Andre Holzner
Jun 8 '16 at 12:35
add a comment |
$begingroup$
I was just wondering what the derivative of $f(x) = max(0,1-x)^{2}$ would be. What technique do you use to determine this derivative?
calculus
$endgroup$
I was just wondering what the derivative of $f(x) = max(0,1-x)^{2}$ would be. What technique do you use to determine this derivative?
calculus
calculus
edited Apr 21 '13 at 18:33
user17762
asked Apr 21 '13 at 18:27
phil12phil12
5823816
5823816
3
$begingroup$
Don't you mean $max(0, (1-x)^2)$?
$endgroup$
– Javier
Apr 21 '13 at 19:05
2
$begingroup$
since $(1-x)^2 ge 0 $ (for x a real number), $max(0,(1-x)^2)$ is equal to $(1-x)^2$
$endgroup$
– Andre Holzner
Jun 8 '16 at 12:35
add a comment |
3
$begingroup$
Don't you mean $max(0, (1-x)^2)$?
$endgroup$
– Javier
Apr 21 '13 at 19:05
2
$begingroup$
since $(1-x)^2 ge 0 $ (for x a real number), $max(0,(1-x)^2)$ is equal to $(1-x)^2$
$endgroup$
– Andre Holzner
Jun 8 '16 at 12:35
3
3
$begingroup$
Don't you mean $max(0, (1-x)^2)$?
$endgroup$
– Javier
Apr 21 '13 at 19:05
$begingroup$
Don't you mean $max(0, (1-x)^2)$?
$endgroup$
– Javier
Apr 21 '13 at 19:05
2
2
$begingroup$
since $(1-x)^2 ge 0 $ (for x a real number), $max(0,(1-x)^2)$ is equal to $(1-x)^2$
$endgroup$
– Andre Holzner
Jun 8 '16 at 12:35
$begingroup$
since $(1-x)^2 ge 0 $ (for x a real number), $max(0,(1-x)^2)$ is equal to $(1-x)^2$
$endgroup$
– Andre Holzner
Jun 8 '16 at 12:35
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
It might be of help to sketch the function or write it without the $max$. We get
$$f(x) = begin{cases} (1-x)^2 & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
It is easy to work out the derivative everywhere except at $x=1$.
At $x=1$, work out explicitly from definition.
$$lim_{h to 0^+} dfrac{f(1+h) - f(1)}{h} = 0$$
$$lim_{h to 0^-} dfrac{f(1+h) - f(1)}{h} = lim_{hto 0^-} dfrac{h^2}{h} = 0$$
Hence, we have
$$f'(x) = begin{cases} 2(x-1) & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
$endgroup$
add a comment |
$begingroup$
HINT : Analyze this function on different intervals.
$endgroup$
$begingroup$
If x >= 1, f'(x) = 0, else f'(x) = -2(1-x)?
$endgroup$
– phil12
Apr 21 '13 at 18:31
$begingroup$
Now what happens when x = 1 ? Does f'(1) exist ?
$endgroup$
– Kalissar
Apr 21 '13 at 18:33
add a comment |
$begingroup$
I would generalize this as follows:
Let
f(x) = max(0, g(x))^2
Then
f'(x) = [2*g(x)*g'(x)] if g(x) is > 0 else [0]
Does it make sense?
$endgroup$
add a comment |
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2fmath.stackexchange.com%2fquestions%2f368432%2fderivative-of-max-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
It might be of help to sketch the function or write it without the $max$. We get
$$f(x) = begin{cases} (1-x)^2 & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
It is easy to work out the derivative everywhere except at $x=1$.
At $x=1$, work out explicitly from definition.
$$lim_{h to 0^+} dfrac{f(1+h) - f(1)}{h} = 0$$
$$lim_{h to 0^-} dfrac{f(1+h) - f(1)}{h} = lim_{hto 0^-} dfrac{h^2}{h} = 0$$
Hence, we have
$$f'(x) = begin{cases} 2(x-1) & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
$endgroup$
add a comment |
$begingroup$
It might be of help to sketch the function or write it without the $max$. We get
$$f(x) = begin{cases} (1-x)^2 & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
It is easy to work out the derivative everywhere except at $x=1$.
At $x=1$, work out explicitly from definition.
$$lim_{h to 0^+} dfrac{f(1+h) - f(1)}{h} = 0$$
$$lim_{h to 0^-} dfrac{f(1+h) - f(1)}{h} = lim_{hto 0^-} dfrac{h^2}{h} = 0$$
Hence, we have
$$f'(x) = begin{cases} 2(x-1) & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
$endgroup$
add a comment |
$begingroup$
It might be of help to sketch the function or write it without the $max$. We get
$$f(x) = begin{cases} (1-x)^2 & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
It is easy to work out the derivative everywhere except at $x=1$.
At $x=1$, work out explicitly from definition.
$$lim_{h to 0^+} dfrac{f(1+h) - f(1)}{h} = 0$$
$$lim_{h to 0^-} dfrac{f(1+h) - f(1)}{h} = lim_{hto 0^-} dfrac{h^2}{h} = 0$$
Hence, we have
$$f'(x) = begin{cases} 2(x-1) & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
$endgroup$
It might be of help to sketch the function or write it without the $max$. We get
$$f(x) = begin{cases} (1-x)^2 & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
It is easy to work out the derivative everywhere except at $x=1$.
At $x=1$, work out explicitly from definition.
$$lim_{h to 0^+} dfrac{f(1+h) - f(1)}{h} = 0$$
$$lim_{h to 0^-} dfrac{f(1+h) - f(1)}{h} = lim_{hto 0^-} dfrac{h^2}{h} = 0$$
Hence, we have
$$f'(x) = begin{cases} 2(x-1) & text{if } x leq 1\ 0 & text{if }x geq 1end{cases}$$
answered Apr 21 '13 at 18:32
user17762
add a comment |
add a comment |
$begingroup$
HINT : Analyze this function on different intervals.
$endgroup$
$begingroup$
If x >= 1, f'(x) = 0, else f'(x) = -2(1-x)?
$endgroup$
– phil12
Apr 21 '13 at 18:31
$begingroup$
Now what happens when x = 1 ? Does f'(1) exist ?
$endgroup$
– Kalissar
Apr 21 '13 at 18:33
add a comment |
$begingroup$
HINT : Analyze this function on different intervals.
$endgroup$
$begingroup$
If x >= 1, f'(x) = 0, else f'(x) = -2(1-x)?
$endgroup$
– phil12
Apr 21 '13 at 18:31
$begingroup$
Now what happens when x = 1 ? Does f'(1) exist ?
$endgroup$
– Kalissar
Apr 21 '13 at 18:33
add a comment |
$begingroup$
HINT : Analyze this function on different intervals.
$endgroup$
HINT : Analyze this function on different intervals.
answered Apr 21 '13 at 18:29
KalissarKalissar
18319
18319
$begingroup$
If x >= 1, f'(x) = 0, else f'(x) = -2(1-x)?
$endgroup$
– phil12
Apr 21 '13 at 18:31
$begingroup$
Now what happens when x = 1 ? Does f'(1) exist ?
$endgroup$
– Kalissar
Apr 21 '13 at 18:33
add a comment |
$begingroup$
If x >= 1, f'(x) = 0, else f'(x) = -2(1-x)?
$endgroup$
– phil12
Apr 21 '13 at 18:31
$begingroup$
Now what happens when x = 1 ? Does f'(1) exist ?
$endgroup$
– Kalissar
Apr 21 '13 at 18:33
$begingroup$
If x >= 1, f'(x) = 0, else f'(x) = -2(1-x)?
$endgroup$
– phil12
Apr 21 '13 at 18:31
$begingroup$
If x >= 1, f'(x) = 0, else f'(x) = -2(1-x)?
$endgroup$
– phil12
Apr 21 '13 at 18:31
$begingroup$
Now what happens when x = 1 ? Does f'(1) exist ?
$endgroup$
– Kalissar
Apr 21 '13 at 18:33
$begingroup$
Now what happens when x = 1 ? Does f'(1) exist ?
$endgroup$
– Kalissar
Apr 21 '13 at 18:33
add a comment |
$begingroup$
I would generalize this as follows:
Let
f(x) = max(0, g(x))^2
Then
f'(x) = [2*g(x)*g'(x)] if g(x) is > 0 else [0]
Does it make sense?
$endgroup$
add a comment |
$begingroup$
I would generalize this as follows:
Let
f(x) = max(0, g(x))^2
Then
f'(x) = [2*g(x)*g'(x)] if g(x) is > 0 else [0]
Does it make sense?
$endgroup$
add a comment |
$begingroup$
I would generalize this as follows:
Let
f(x) = max(0, g(x))^2
Then
f'(x) = [2*g(x)*g'(x)] if g(x) is > 0 else [0]
Does it make sense?
$endgroup$
I would generalize this as follows:
Let
f(x) = max(0, g(x))^2
Then
f'(x) = [2*g(x)*g'(x)] if g(x) is > 0 else [0]
Does it make sense?
answered Jul 22 '17 at 6:14
khankhan
1488
1488
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- 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.
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%2fmath.stackexchange.com%2fquestions%2f368432%2fderivative-of-max-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
3
$begingroup$
Don't you mean $max(0, (1-x)^2)$?
$endgroup$
– Javier
Apr 21 '13 at 19:05
2
$begingroup$
since $(1-x)^2 ge 0 $ (for x a real number), $max(0,(1-x)^2)$ is equal to $(1-x)^2$
$endgroup$
– Andre Holzner
Jun 8 '16 at 12:35