Plotting Vector and Derivative: A Frustrating Challenge

In summary, the conversation discusses the struggle to plot a vector and its derivative in Mathematica. The code for defining the vector and attempting to plot it is shared, and the speaker asks for advice on how to correctly plot the vector and its derivative. The expert suggests starting by just plotting the vector and then comparing the code to plot the derivative. They also recommend using the methods described in the provided link to combine the two plots and add a point at the specific location of the derivative.
  • #1
dpeagler
34
0
I have been trying to plot a vector and it's derivative for a while now, but I cannot figure out why I can't get them to plot.

Here is what I put for my code...

a[t_] := Sin[t] Cos[2 t]
b[t_] := Sin[t] Sin[2 t]
c[t_] := Cos[t]
V[t_] := {a, b, c}

I tried this...

ParametricPlot[{a[t], b[t], c[t]}, {a'[t], b'[t], c'[t]}, {t, -\[Pi]/2, \[Pi]/2}, {t, \[Pi]/4}]

and this...

ParametricPlot[{V[t]},{V'[\[Pi]/4]},{{t, -\[Pi]/2, \[Pi]/2}

The function is seen as V[t]. I want to graph it from -Pi/2 to Pi/2 and I want to have V'[Pi/4] on the same graph. And then I want to have two different images.

I know that's a lot, but I'm sure it's something really simple that I'm missing. Thanks to anyone who can give any advice.
 
Physics news on Phys.org
  • #2
See if you can just plot the vector first.

a[t_] := Sin[t] Cos[2 t];
b[t_] := Sin[t] Sin[2 t];
c[t_] := Cos[t];
V[t_] := {a[t], b[t], c[t]};
ParametricPlot3D[V[t], {t, -Pi/2, Pi/2}]

If that works then compare what I did with what you did and figure out the differences.

After that see if you can just plot the derivative

ParametricPlot3D[{a'[t], b'[t], c'[t]}, {t, -Pi/2, Pi/2}]

After that perhaps you can start thinking about combining the two
 
  • #3
Thanks for the response. The only thing I am confused about is why you are plotting the derivative over the same range. It is only supposed to be at the point Pi/4
 
  • #5


I can understand your frustration with trying to plot vectors and their derivatives. It can be a challenging task, but with some careful consideration and understanding of the mathematical principles involved, it can be achieved.

Firstly, it's important to note that a vector, such as the one you have defined as V[t], is a function of time. This means that it has a value at every point in time, and therefore cannot be plotted in the same way as a regular function.

To plot a vector, you need to use a parametric plot, which allows you to plot functions of multiple variables. In your code, you have correctly used the ParametricPlot function, but there are a few errors that need to be corrected.

Firstly, when defining a vector function, you need to specify the components separately, rather than using curly brackets. So your code for V[t] should be:

V[t_] := {a[t], b[t], c[t]}

Next, in the ParametricPlot function, you need to specify the range of values for the parameter t. In your case, you want to plot from -π/2 to π/2, so the code should be:

ParametricPlot[V[t], {t, -π/2, π/2}]

To plot the derivative of V[t], you can use the VectorPlot function, which is specifically designed for plotting vector fields. The code for this would be:

VectorPlot[V'[t], {t, -π/2, π/2}]

If you want to plot both the vector and its derivative on the same graph, you can use the Show function, which allows you to combine multiple plots. The code for this would be:

Show[ParametricPlot[V[t], {t, -π/2, π/2}], VectorPlot[V'[t], {t, -π/2, π/2}]]

I hope this helps to clarify the process of plotting vectors and their derivatives. Remember to carefully consider the mathematical principles involved and to double check your code for any errors. Good luck!
 

Related to Plotting Vector and Derivative: A Frustrating Challenge

1. What is the purpose of plotting vector and derivative?

The purpose of plotting vector and derivative is to visually represent the relationship between a function and its rate of change. This can provide insights into the behavior of the function and help in solving problems related to calculus.

2. How do you plot a vector and derivative graph?

To plot a vector and derivative graph, you need to first find the derivative of the given function. Then, choose a set of values for the independent variable and calculate the corresponding values for the function and its derivative. Finally, plot the points on a graph and connect them to form a curve for the function and a line for the derivative.

3. What is the difference between a vector and a derivative?

A vector is a quantity that has both magnitude and direction, while a derivative is a mathematical concept that represents the rate of change of a function with respect to its independent variable. In graphing, a vector is represented as a curve, while a derivative is represented as a straight line.

4. What are some common challenges in plotting vector and derivative?

Some common challenges in plotting vector and derivative include finding the correct derivative of a function, choosing appropriate intervals for the independent variable, and accurately plotting the points on the graph. Another challenge is interpreting the meaning of the graph and relating it back to the original function.

5. How can plotting vector and derivative be used in real life?

Plotting vector and derivative can be used in many fields, such as physics, engineering, and economics. In physics, it can be used to analyze the motion of objects, while in engineering, it can help in designing systems and predicting their behavior. In economics, it can be used to model and understand market trends and patterns.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
238
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
282
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
585
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
907
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Back
Top