1

I could use some help with this. This is my first time using mathematica and im trying to get use to the coding. Find an equation of the tangent to the curve and graph the curve and tangents. x=sin(t) y=t+t^2 Point (0,0)

Where is a good place to start? how would i go about coding this?

Thanks!

Quentin
  • 43
  • 1
  • 5

1 Answers1

3

It is always good to start with a working technology, what you have already learned in Calculus helps you. Embark familiar with the basics of Mathematica and the search functions on this page.

ClearAll["Global`*"]

Write down in Mathematica notation what you have:

f[t_] := Sin[t]

g[t_] := t + t^2

p1 = {0, 0};

Make it a plot:

Plot[{f[t], g[t]}, {t, -\[Pi], \[Pi]}
 , PlotRange -> {{-\[Pi]/2, \[Pi]/2}, {-1.5, 1.5}}
 , Frame -> True
 , Epilog -> {Red, PointSize[0.02], Point[p1]}]

enter image description here

The tangent line goes through the point P (0, 0), calculate the slope and plot it:

expr = (g[t] - 0)/(t - 0)

m = Limit[expr, t -> 0]

Plot[expr
 , {t, -\[Pi]/2, \[Pi]/2}
 , PlotStyle -> Darker[Green]
 , Frame -> True]

enter image description here

The tangent as a function:

tangent[t_] := m (t - 0) + 0

And now all together:

Plot[{f[t]
  , g[t]
  , tangent[t]}
 , {t, -\[Pi], \[Pi]}
 , PlotRange -> {{-\[Pi], \[Pi]}, {-1.5, 1.5}}
 , Frame -> True
 , Epilog -> {Red, PointSize[0.02], Point[p1]}
 , PlotLegends -> "Expressions"]

enter image description here

I hope that gives you a good start - have fun!