0
$\begingroup$

This question already has an answer here:

I'm new to Mathematica and this is probably child's play for most people, but I wanted to know how to plot the tangent of the function below at the point e=1/4 :

7.523190091795795`*^-18 (1.329223358440088`*^17 - 
   3.9876700753202693`*^18 e + 
   Sqrt[-8.944600854152669`*^34 + 
    1.4311361366644287`*^37 e^2]), {e, 0, 1}, PlotRange -> {{0.1, 
   0.3}, {0.1, 0.25}}

Your help would be greatly appreciated!

$\endgroup$

marked as duplicate by Yves Klett, Bob Hanlon, dr.blochwave, m_goldberg, kale Jul 2 '15 at 16:10

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$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Jul 2 '15 at 14:21
  • $\begingroup$ Welcome! You should post complete code. At the moment, some parts seem to be missing... this seems like a possible duplicate of mathematica.stackexchange.com/q/18090/131 $\endgroup$ – Yves Klett Jul 2 '15 at 14:21
  • $\begingroup$ There are plenty of answers on the site that seem to address this question: (10669), (18090), (74015); and a bunch of other possibilities. If those answer do not address your question, please indicate how. $\endgroup$ – Michael E2 Jul 2 '15 at 14:22
  • $\begingroup$ @MichaelE2 is there a shortcut to get the "(nnn)" hyperlink to a given question? $\endgroup$ – Yves Klett Jul 2 '15 at 14:24
  • 2
    $\begingroup$ @YvesKlett Yes, but I don't have it. I say yes because someone asked Mr.Wizard, who said it was a script he developed. I've never bothered to learn how to do such things. Alternatively, I have an MSE notebook with init cells that have things like this in them: qlink[n_] := StringReplace["[(qn)](http://mathematica.stackexchange.com/q/qn)", "qn" :> ToString[n]] $\endgroup$ – Michael E2 Jul 2 '15 at 14:31
4
$\begingroup$

This is possibly a duplicate, but the answers given in most cases seem probably more in depth than the OP is looking for, being a newcomer to Mathematica.

First you should define f as a function.

f[e_] := 7.523190091795795`*^-18 (1.329223358440088`*^17 - 
     3.9876700753202693`*^18 e + 
     Sqrt[-8.944600854152669`*^34 + 1.4311361366644287`*^37 e^2]);

From there the tangent line to some point is given by first two terms of the series expansion, so to get the plot you're looking for you can use Mathematica's Series function, which you can read about in the docs.

Plot[{
  f[x],
  Evaluate@Normal@Series[f[x], {x, 1/4, 1}]
  }, {x, 0.1, 0.3}
 , PlotRange -> All
 ]

Here Evaluate@Normal@... is just preparing the output of Series for the Plot function. This give the following image, where the blue line is your original function, and the orange is the tangent:

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.