Message Boards Message Boards

0
|
3185 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Equation of tangent line

Posted 2 years ago

I am a beginner at Mathematica, and I am having some trouble deciding on the correct way to input certain areas of this problem.

The problem reads: Find the equation of the tangent line for the following function. Then plot the original equation and the tangent line on the same graph. x=cos(pi*t), y=t^3+2t, (0,9/8)

I am unsure how to input the point given into the equation. When I have attempted in several different ways, I always end up with the error code ComplexInfinity. I would appreciate help with me solving this problem and potentially plotting the equations on the same line, as I have not gotten that far.

This is what I have so far:

POSTED BY: Kaylea Anderson
3 Replies
Posted 2 years ago

Next, I notice you wrote the expression Point[{0,9/8}]. There are a couple of things to note here. First, Point is used for graphics. The cartesian point as data would be represented as just {0,9/8}. Also, just evaluating that expression doesn't do anything for you, and you can see that it's just replicated in the output. You might want to assign it to a variable at some point, but you don't need it here in this cell.

And that's another thing. It's generally more organized to separate separate conceptual steps into separate cells. So, maybe you put your function definitions into a cell and then put your derivative expression in a separate cell. It's not necessary or critical, but it helps keep things organized and avoids unexpected interpretations.

Finally, in case you haven't discovered it yet, you'll want to look at ParametricPlot when you get to the point of plotting this function.

POSTED BY: Eric Rimbey
Posted 2 years ago

Take a look at this post.

POSTED BY: Rohit Namjoshi
Posted 2 years ago

Mathematica represents the constant pi as just Pi. When you're inputting Pi, just type it in as "Pi" (capitalized). You can represent multiplication as either * or just a space. And generally you would use the SetDelayed form to define your functions, at least this is probably best for Mathematica beginners. So, to define x you'd do something like

x[t_] := Cos[Pi t]

What was happening is that the special Greek form of pi that you were using was interpreted as just a regular symbol (well actually, it looks like there was no space, so the symbol was the "word" spelled with the letters pi and t.

I find it easier to not bother with special formatting for inputs. So your definition of y could be

y[t_] := t^3 + 2 t

I've added spaces to try to make things clear, but in this expression they are not required. Mathematica will figure out that a number followed by a symbol should be interpreted as multiplication.

What was happening was that you defined a function, x, in terms of t but the variable t didn't show up in the definition. So, x was effectively a constant, and taking its derivative in terms of t resulted in 0.

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract