Difference between revisions of "Discontinuous derivative"

From JSXGraph Wiki
Jump to: navigation, search
Line 2: Line 2:
 
:<math> f: \mathbb{R} \to \mathbb{R}, x \mapsto  
 
:<math> f: \mathbb{R} \to \mathbb{R}, x \mapsto  
 
\begin{cases}
 
\begin{cases}
x^2*sin(1/x),& x\neq 0\\
+
x^2\sin(1/x),& x\neq 0\\
 
0, x=0
 
0, x=0
\end{cases}
+
\end{cases}\,.
 
</math>
 
</math>
 +
<math>f</math> is a continous and differentiable.
 +
But the derivative of <math>f</<math> is the function
 +
:<math>
 +
f': \mathbb{R} \to \mathbb{R}, x \mapsto
 +
\begin{cases}
 +
2\sin(1/x) - \cos(1/x), &x \neq 0\\
 +
0, x=0
 +
\end{cases}\,.
 +
<math>
 +
We observe that <math>f'(0) = 0</math> but <math>\lim_{x\to0}f'(x)</math> does not exist.
 +
 +
Therefore, <math>f'</math> is an example of a derivative which is not continuous.
  
 
<jsxgraph width="500" height="500">
 
<jsxgraph width="500" height="500">
Line 16: Line 28:
 
===The underlying JavaScript code===
 
===The underlying JavaScript code===
 
<source lang="javascript">
 
<source lang="javascript">
 +
var board = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-1/2,1/2,1/2,-1/2]});
 +
 +
var g = board.create('functiongraph', ["2*sin(1/x) - cos(1/x)"], {strokeColor: 'red'});
 +
var f = board.create('functiongraph', ["x^2*sin(1/x)"], {strokeWidth:2});
 
</source>
 
</source>
  
 
[[Category:Examples]]
 
[[Category:Examples]]
 
[[Category:Calculus]]
 
[[Category:Calculus]]

Revision as of 10:00, 13 February 2019

Consider the function

[math] f: \mathbb{R} \to \mathbb{R}, x \mapsto \begin{cases} x^2\sin(1/x),& x\neq 0\\ 0, x=0 \end{cases}\,. [/math]

[math]f[/math] is a continous and differentiable. But the derivative of [math]f\lt/\ltmath\gt is the function :\ltmath\gt f': \mathbb{R} \to \mathbb{R}, x \mapsto \begin{cases} 2\sin(1/x) - \cos(1/x), &x \neq 0\\ 0, x=0 \end{cases}\,. \ltmath\gt We observe that \ltmath\gtf'(0) = 0[/math] but [math]\lim_{x\to0}f'(x)[/math] does not exist.

Therefore, [math]f'[/math] is an example of a derivative which is not continuous.

The underlying JavaScript code

var board = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-1/2,1/2,1/2,-1/2]});

var g = board.create('functiongraph', ["2*sin(1/x) - cos(1/x)"], {strokeColor: 'red'});
var f = board.create('functiongraph', ["x^2*sin(1/x)"], {strokeWidth:2});