finding an equation of the tangent line to a curve at the given point in MATLAB
166 ビュー (過去 30 日間)
回答 (2 件)
Birdman 2021 年 1 月 27 日
Actually, it is quite simple to do. For instance, let's define the equation symbolically in MATLAB:
Then, take the derivative:
which would be
At this point, you can find the slope of the tangent line at point (2,-4) by inserting 2 into the above equation, which would be
You know that the slope of tangent line is -8, but you should also find the value of y for that tangent line. Consider it as
Then find the c by simply
where c would be 12.
If you plot both curves in the same figure, you will get
where the blue line is the original equation and red line is tangent line.