cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Plotting functions (derivatives)?

TE_11361502
2-Guest

Plotting functions (derivatives)?

Hello, I am working on an assignment that asks me to "plot the function (y(x)) and the first derivative of the function." Now my function is (2x^3-x^2+3) and its first derivative (6x^2-2x). For some reason, I cannot get the plot to show up like I know it should, It just doesn't look right. How would you all go about plotting this? (PTC Mathcad Prime)

1 ACCEPTED SOLUTION

Accepted Solutions

Why don't you attach your worksheet?

EDIT: I just saw that you made up for it later.

 

And why do you think that there is something wrong?

 

If the plot does not look like what you expect, you have to format it accordingly. And if you don't succeed doing so, you have to clearly state WHAT exactly you want it to look like.

 

I guess that you are confused because of Primes autoscaling. When using a so called quick plot (the variable x used at the abscissa must not be defined), Prime choses the values for the x-axis to run from -10 to +10. So the y-values are rather large and Prime has to scale the y-axis accordingly (look at the scale values in your plot) and this results in a heavily vertically squeezed plot.

 

There are two ways you can control this.

 

The first is to edit the values at each axis. You can edit the first, second and the last value at each axis (highlighted in yellow in the picture below). This is not a particularly intelligent solution, because hitting the right spots here can be very challenging, but once you do it works.
Werner_E_0-1720702904772.png

As you can also see in the picture it is not necessary to define the expression for the derivative. Prime will use a numerical algorithm to make up the plot. At the bottom of the picture you can see that you can also use the symbolic evaluation to show you the exact expression for the derivative.

 

A second way to take over control of a plot is to define a range variable for the abscissa values. In the following picture I just used the name "xx" to use something different as in the picture before. Of course you can also use simply "x" as the name of the range. Note that Prime still will automatically adopt the necessary range for the y-values and the autoscale it selects is not always very clever, But you still can manually edit the values as explained before.

Werner_E_1-1720703391643.png

 

Prime 5 sheet attached

 

View solution in original post

5 REPLIES 5
LucMeekes
23-Emerald III
(To:TE_11361502)

Welcome to the forum

Well, the trick is to just enter the function and plot it. For the derivative we'd use the proper operator and plot it as well. So it's simple. 

Without your Prime worksheet there's nothing we can say about your case. So it's imperative for you to:

1. Attach the Prime worksheet (.mcdx  file) that shows your problem.

2. State which version of Prime you are using.

 

Success!

Luc.

MathCAD Example.png

Here is what I am working with. I'm in Mathcad Prime 5.0.0.0 academic.

Why don't you attach your worksheet?

EDIT: I just saw that you made up for it later.

 

And why do you think that there is something wrong?

 

If the plot does not look like what you expect, you have to format it accordingly. And if you don't succeed doing so, you have to clearly state WHAT exactly you want it to look like.

 

I guess that you are confused because of Primes autoscaling. When using a so called quick plot (the variable x used at the abscissa must not be defined), Prime choses the values for the x-axis to run from -10 to +10. So the y-values are rather large and Prime has to scale the y-axis accordingly (look at the scale values in your plot) and this results in a heavily vertically squeezed plot.

 

There are two ways you can control this.

 

The first is to edit the values at each axis. You can edit the first, second and the last value at each axis (highlighted in yellow in the picture below). This is not a particularly intelligent solution, because hitting the right spots here can be very challenging, but once you do it works.
Werner_E_0-1720702904772.png

As you can also see in the picture it is not necessary to define the expression for the derivative. Prime will use a numerical algorithm to make up the plot. At the bottom of the picture you can see that you can also use the symbolic evaluation to show you the exact expression for the derivative.

 

A second way to take over control of a plot is to define a range variable for the abscissa values. In the following picture I just used the name "xx" to use something different as in the picture before. Of course you can also use simply "x" as the name of the range. Note that Prime still will automatically adopt the necessary range for the y-values and the autoscale it selects is not always very clever, But you still can manually edit the values as explained before.

Werner_E_1-1720703391643.png

 

Prime 5 sheet attached

 

I think the reason I was so confused was the range in which the graph was plotted. My graphing calculator, while looking similar, was scaled way down, so I think my problem was the scale. Thanks everyone for the help!

Hi,

simple example ...

MartinHanak_0-1720681713199.png

 


Martin Hanák
Top Tags