How do I draw a function along with a particular tangent line at a specific point? [duplicate]
$begingroup$
This question already has an answer here:
Equation of a line that is tangent to a curve at point
2 answers
I would like to draw a function (x/x^2+1), and at a certain point, i'd like to draw a dot along with the tangent line at that specific point.
what I have tried is the following:
Plot[{function[x], function'[x]}, {x, -5, 5}, AxesLabel -> {x, y} LabelStyle -> Direction[Black, Bold]]
However, this plots the original function f(x) and f'(x) simultaneously; how can I achieve the desired result?
plotting calculus-and-analysis functions
$endgroup$
marked as duplicate by J. M. is slightly pensive♦
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Mar 13 at 2:19
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
$begingroup$
This question already has an answer here:
Equation of a line that is tangent to a curve at point
2 answers
I would like to draw a function (x/x^2+1), and at a certain point, i'd like to draw a dot along with the tangent line at that specific point.
what I have tried is the following:
Plot[{function[x], function'[x]}, {x, -5, 5}, AxesLabel -> {x, y} LabelStyle -> Direction[Black, Bold]]
However, this plots the original function f(x) and f'(x) simultaneously; how can I achieve the desired result?
plotting calculus-and-analysis functions
$endgroup$
marked as duplicate by J. M. is slightly pensive♦
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Mar 13 at 2:19
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
$begingroup$
Duplicate: mathematica.stackexchange.com/questions/87375/…, which is a duplicate of mathematica.stackexchange.com/questions/18090/…
$endgroup$
– Michael E2
Feb 25 at 4:38
$begingroup$
Also this thread.
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 7:06
add a comment |
$begingroup$
This question already has an answer here:
Equation of a line that is tangent to a curve at point
2 answers
I would like to draw a function (x/x^2+1), and at a certain point, i'd like to draw a dot along with the tangent line at that specific point.
what I have tried is the following:
Plot[{function[x], function'[x]}, {x, -5, 5}, AxesLabel -> {x, y} LabelStyle -> Direction[Black, Bold]]
However, this plots the original function f(x) and f'(x) simultaneously; how can I achieve the desired result?
plotting calculus-and-analysis functions
$endgroup$
This question already has an answer here:
Equation of a line that is tangent to a curve at point
2 answers
I would like to draw a function (x/x^2+1), and at a certain point, i'd like to draw a dot along with the tangent line at that specific point.
what I have tried is the following:
Plot[{function[x], function'[x]}, {x, -5, 5}, AxesLabel -> {x, y} LabelStyle -> Direction[Black, Bold]]
However, this plots the original function f(x) and f'(x) simultaneously; how can I achieve the desired result?
This question already has an answer here:
Equation of a line that is tangent to a curve at point
2 answers
plotting calculus-and-analysis functions
plotting calculus-and-analysis functions
edited Feb 25 at 2:04
J. M. is slightly pensive♦
98.7k10310467
98.7k10310467
asked Feb 24 at 5:38
JaigusJaigus
1775
1775
marked as duplicate by J. M. is slightly pensive♦
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Mar 13 at 2:19
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by J. M. is slightly pensive♦
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Mar 13 at 2:19
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
$begingroup$
Duplicate: mathematica.stackexchange.com/questions/87375/…, which is a duplicate of mathematica.stackexchange.com/questions/18090/…
$endgroup$
– Michael E2
Feb 25 at 4:38
$begingroup$
Also this thread.
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 7:06
add a comment |
$begingroup$
Duplicate: mathematica.stackexchange.com/questions/87375/…, which is a duplicate of mathematica.stackexchange.com/questions/18090/…
$endgroup$
– Michael E2
Feb 25 at 4:38
$begingroup$
Also this thread.
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 7:06
$begingroup$
Duplicate: mathematica.stackexchange.com/questions/87375/…, which is a duplicate of mathematica.stackexchange.com/questions/18090/…
$endgroup$
– Michael E2
Feb 25 at 4:38
$begingroup$
Duplicate: mathematica.stackexchange.com/questions/87375/…, which is a duplicate of mathematica.stackexchange.com/questions/18090/…
$endgroup$
– Michael E2
Feb 25 at 4:38
$begingroup$
Also this thread.
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 7:06
$begingroup$
Also this thread.
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 7:06
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
function[x_] := x/(x^2 + 1);
x0 = 1/2;
Plot[{function[x], function[x0] + function'[x0] (x - x0)}, {x, -5, 5},
AxesLabel -> {x, y}, LabelStyle -> Direction[Black, Bold],
Mesh -> {{x0}}, MeshStyle -> Directive[Red, PointSize[Large]]]

$endgroup$
$begingroup$
Hey thanks! I'm trying to plot this at point 45, but it doesn't seem to plot the tangent at that point; instead the tangent is on a completely different line with two dots?
$endgroup$
– Jaigus
Feb 24 at 6:50
$begingroup$
@Jaigus, there was a typo; fixed now.Mesh -> {{1/2}}should beMesh -> {{x0}}.
$endgroup$
– kglr
Feb 24 at 7:12
$begingroup$
Thanks alot, this works great.
$endgroup$
– Jaigus
Feb 24 at 7:25
1
$begingroup$
Alternatively:Plot[{function[x], Normal[Series[function[x], {x, x0, 1}]]} // Evaluate, {x, -5, 5}].
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 2:04
$begingroup$
@J.M.iscomputer-less, that's much neater.
$endgroup$
– kglr
Feb 25 at 7:04
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
function[x_] := x/(x^2 + 1);
x0 = 1/2;
Plot[{function[x], function[x0] + function'[x0] (x - x0)}, {x, -5, 5},
AxesLabel -> {x, y}, LabelStyle -> Direction[Black, Bold],
Mesh -> {{x0}}, MeshStyle -> Directive[Red, PointSize[Large]]]

$endgroup$
$begingroup$
Hey thanks! I'm trying to plot this at point 45, but it doesn't seem to plot the tangent at that point; instead the tangent is on a completely different line with two dots?
$endgroup$
– Jaigus
Feb 24 at 6:50
$begingroup$
@Jaigus, there was a typo; fixed now.Mesh -> {{1/2}}should beMesh -> {{x0}}.
$endgroup$
– kglr
Feb 24 at 7:12
$begingroup$
Thanks alot, this works great.
$endgroup$
– Jaigus
Feb 24 at 7:25
1
$begingroup$
Alternatively:Plot[{function[x], Normal[Series[function[x], {x, x0, 1}]]} // Evaluate, {x, -5, 5}].
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 2:04
$begingroup$
@J.M.iscomputer-less, that's much neater.
$endgroup$
– kglr
Feb 25 at 7:04
add a comment |
$begingroup$
function[x_] := x/(x^2 + 1);
x0 = 1/2;
Plot[{function[x], function[x0] + function'[x0] (x - x0)}, {x, -5, 5},
AxesLabel -> {x, y}, LabelStyle -> Direction[Black, Bold],
Mesh -> {{x0}}, MeshStyle -> Directive[Red, PointSize[Large]]]

$endgroup$
$begingroup$
Hey thanks! I'm trying to plot this at point 45, but it doesn't seem to plot the tangent at that point; instead the tangent is on a completely different line with two dots?
$endgroup$
– Jaigus
Feb 24 at 6:50
$begingroup$
@Jaigus, there was a typo; fixed now.Mesh -> {{1/2}}should beMesh -> {{x0}}.
$endgroup$
– kglr
Feb 24 at 7:12
$begingroup$
Thanks alot, this works great.
$endgroup$
– Jaigus
Feb 24 at 7:25
1
$begingroup$
Alternatively:Plot[{function[x], Normal[Series[function[x], {x, x0, 1}]]} // Evaluate, {x, -5, 5}].
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 2:04
$begingroup$
@J.M.iscomputer-less, that's much neater.
$endgroup$
– kglr
Feb 25 at 7:04
add a comment |
$begingroup$
function[x_] := x/(x^2 + 1);
x0 = 1/2;
Plot[{function[x], function[x0] + function'[x0] (x - x0)}, {x, -5, 5},
AxesLabel -> {x, y}, LabelStyle -> Direction[Black, Bold],
Mesh -> {{x0}}, MeshStyle -> Directive[Red, PointSize[Large]]]

$endgroup$
function[x_] := x/(x^2 + 1);
x0 = 1/2;
Plot[{function[x], function[x0] + function'[x0] (x - x0)}, {x, -5, 5},
AxesLabel -> {x, y}, LabelStyle -> Direction[Black, Bold],
Mesh -> {{x0}}, MeshStyle -> Directive[Red, PointSize[Large]]]

edited Feb 24 at 7:11
answered Feb 24 at 6:05
kglrkglr
189k10206424
189k10206424
$begingroup$
Hey thanks! I'm trying to plot this at point 45, but it doesn't seem to plot the tangent at that point; instead the tangent is on a completely different line with two dots?
$endgroup$
– Jaigus
Feb 24 at 6:50
$begingroup$
@Jaigus, there was a typo; fixed now.Mesh -> {{1/2}}should beMesh -> {{x0}}.
$endgroup$
– kglr
Feb 24 at 7:12
$begingroup$
Thanks alot, this works great.
$endgroup$
– Jaigus
Feb 24 at 7:25
1
$begingroup$
Alternatively:Plot[{function[x], Normal[Series[function[x], {x, x0, 1}]]} // Evaluate, {x, -5, 5}].
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 2:04
$begingroup$
@J.M.iscomputer-less, that's much neater.
$endgroup$
– kglr
Feb 25 at 7:04
add a comment |
$begingroup$
Hey thanks! I'm trying to plot this at point 45, but it doesn't seem to plot the tangent at that point; instead the tangent is on a completely different line with two dots?
$endgroup$
– Jaigus
Feb 24 at 6:50
$begingroup$
@Jaigus, there was a typo; fixed now.Mesh -> {{1/2}}should beMesh -> {{x0}}.
$endgroup$
– kglr
Feb 24 at 7:12
$begingroup$
Thanks alot, this works great.
$endgroup$
– Jaigus
Feb 24 at 7:25
1
$begingroup$
Alternatively:Plot[{function[x], Normal[Series[function[x], {x, x0, 1}]]} // Evaluate, {x, -5, 5}].
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 2:04
$begingroup$
@J.M.iscomputer-less, that's much neater.
$endgroup$
– kglr
Feb 25 at 7:04
$begingroup$
Hey thanks! I'm trying to plot this at point 45, but it doesn't seem to plot the tangent at that point; instead the tangent is on a completely different line with two dots?
$endgroup$
– Jaigus
Feb 24 at 6:50
$begingroup$
Hey thanks! I'm trying to plot this at point 45, but it doesn't seem to plot the tangent at that point; instead the tangent is on a completely different line with two dots?
$endgroup$
– Jaigus
Feb 24 at 6:50
$begingroup$
@Jaigus, there was a typo; fixed now.
Mesh -> {{1/2}} should be Mesh -> {{x0}}.$endgroup$
– kglr
Feb 24 at 7:12
$begingroup$
@Jaigus, there was a typo; fixed now.
Mesh -> {{1/2}} should be Mesh -> {{x0}}.$endgroup$
– kglr
Feb 24 at 7:12
$begingroup$
Thanks alot, this works great.
$endgroup$
– Jaigus
Feb 24 at 7:25
$begingroup$
Thanks alot, this works great.
$endgroup$
– Jaigus
Feb 24 at 7:25
1
1
$begingroup$
Alternatively:
Plot[{function[x], Normal[Series[function[x], {x, x0, 1}]]} // Evaluate, {x, -5, 5}].$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 2:04
$begingroup$
Alternatively:
Plot[{function[x], Normal[Series[function[x], {x, x0, 1}]]} // Evaluate, {x, -5, 5}].$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 2:04
$begingroup$
@J.M.iscomputer-less, that's much neater.
$endgroup$
– kglr
Feb 25 at 7:04
$begingroup$
@J.M.iscomputer-less, that's much neater.
$endgroup$
– kglr
Feb 25 at 7:04
add a comment |
$begingroup$
Duplicate: mathematica.stackexchange.com/questions/87375/…, which is a duplicate of mathematica.stackexchange.com/questions/18090/…
$endgroup$
– Michael E2
Feb 25 at 4:38
$begingroup$
Also this thread.
$endgroup$
– J. M. is slightly pensive♦
Feb 25 at 7:06