How do I draw a function along with a particular tangent line at a specific point?Is it possible to plot a...

Is there any danger of my neighbor having my wife's signature?

Can I use a single resistor for multiple LED with different +ve sources?

Is it possible to narrate a novel in a faux-historical style without alienating the reader?

How to write Muḥammad ibn Mūsā al-Khwārizmī?

Why does a single AND gate need 60 transistors?

Why would you use 2 alternate layout buttons instead of 1, when only one can be selected at once

How can I handle players killing my NPC outside of combat?

Is "accuse people to be racist" grammatical?

Is there a way to pause a running process on Linux systems and resume later?

Using time travel without creating plot holes

What's the reason that we have different quantities of days each month?

Multiple null checks in Java 8

How can I give a Ranger advantage on a check due to Favored Enemy without spoiling the story for the player?

How to deal with an underperforming subordinate?

Buying a "Used" Router

Sing Baby Shark

Is practicing on a digital piano harmful to an experienced piano player?

Are all power cords made equal?

How do I narratively explain how in-game circumstances do not mechanically allow a PC to instantly kill an NPC?

Using Ansible, how can I take actions on each file in a specific location?

Including proofs of known theorems in master's thesis

What happened to Hermione’s clothing and other possessions after she wiped her parents’ memories of her?

Why is Shelob considered evil?

How do I fight with Heavy Armor as a Wizard with Tenser's Transformation?



How do I draw a function along with a particular tangent line at a specific point?


Is it possible to plot a function using Plot3D and a curve using ParametricPlot3D in the same picture?How to draw a tangent to a surface in a given direction?Drawing a pair of lines to the x-axis and y-axis from a point along a curveDistributing function arguments with function compositions. How to compute $(f + g^2)(x) = f(x) + g(x)^2$?Plot absolute value inequalities - number linePlotting the sum of two points on an elliptic curveSetting up a coordinate system and canvas size for subsequent drawingPlotting eigenvalue function along a path with correct coloringContour Plot: Selecting the contour line that crosses a specific pointHow to draw line animation using ListPlot?













1












$begingroup$


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?










share|improve this question









$endgroup$

















    1












    $begingroup$


    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?










    share|improve this question









    $endgroup$















      1












      1








      1





      $begingroup$


      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?










      share|improve this question









      $endgroup$




      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 functions






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      JaigusJaigus

      1403




      1403






















          1 Answer
          1






          active

          oldest

          votes


















          2












          $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]]]


          enter image description here






          share|improve this answer











          $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
            1 hour ago










          • $begingroup$
            @Jaigus, there was a typo; fixed now. Mesh -> {{1/2}} should be Mesh -> {{x0}}.
            $endgroup$
            – kglr
            56 mins ago










          • $begingroup$
            Thanks alot, this works great.
            $endgroup$
            – Jaigus
            43 mins ago











          Your Answer





          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: "387"
          };
          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: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f192100%2fhow-do-i-draw-a-function-along-with-a-particular-tangent-line-at-a-specific-poin%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2












          $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]]]


          enter image description here






          share|improve this answer











          $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
            1 hour ago










          • $begingroup$
            @Jaigus, there was a typo; fixed now. Mesh -> {{1/2}} should be Mesh -> {{x0}}.
            $endgroup$
            – kglr
            56 mins ago










          • $begingroup$
            Thanks alot, this works great.
            $endgroup$
            – Jaigus
            43 mins ago
















          2












          $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]]]


          enter image description here






          share|improve this answer











          $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
            1 hour ago










          • $begingroup$
            @Jaigus, there was a typo; fixed now. Mesh -> {{1/2}} should be Mesh -> {{x0}}.
            $endgroup$
            – kglr
            56 mins ago










          • $begingroup$
            Thanks alot, this works great.
            $endgroup$
            – Jaigus
            43 mins ago














          2












          2








          2





          $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]]]


          enter image description here






          share|improve this answer











          $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]]]


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 57 mins ago

























          answered 2 hours ago









          kglrkglr

          185k10202421




          185k10202421












          • $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
            1 hour ago










          • $begingroup$
            @Jaigus, there was a typo; fixed now. Mesh -> {{1/2}} should be Mesh -> {{x0}}.
            $endgroup$
            – kglr
            56 mins ago










          • $begingroup$
            Thanks alot, this works great.
            $endgroup$
            – Jaigus
            43 mins ago


















          • $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
            1 hour ago










          • $begingroup$
            @Jaigus, there was a typo; fixed now. Mesh -> {{1/2}} should be Mesh -> {{x0}}.
            $endgroup$
            – kglr
            56 mins ago










          • $begingroup$
            Thanks alot, this works great.
            $endgroup$
            – Jaigus
            43 mins ago
















          $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
          1 hour ago




          $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
          1 hour ago












          $begingroup$
          @Jaigus, there was a typo; fixed now. Mesh -> {{1/2}} should be Mesh -> {{x0}}.
          $endgroup$
          – kglr
          56 mins ago




          $begingroup$
          @Jaigus, there was a typo; fixed now. Mesh -> {{1/2}} should be Mesh -> {{x0}}.
          $endgroup$
          – kglr
          56 mins ago












          $begingroup$
          Thanks alot, this works great.
          $endgroup$
          – Jaigus
          43 mins ago




          $begingroup$
          Thanks alot, this works great.
          $endgroup$
          – Jaigus
          43 mins ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematica 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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f192100%2fhow-do-i-draw-a-function-along-with-a-particular-tangent-line-at-a-specific-poin%23new-answer', 'question_page');
          }
          );

          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







          Popular posts from this blog

          Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

          Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

          How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...