# Graphing Cubic Functions

I'm having a Little bit of trouble in Cubic Functions, especially when i need to graph the Turning Point, Y-intercepts, X-intercepts etc. My class teacher had told us to use Gradient Method:

lets say: $$f(x)=x^3+x^2+x+2$$

We can turn this equation around by using the Gradient Method:

$$f'(x)=3x^2+2x+1$$

so it a quadratic equation. But i would like to find out more about this method too, if anyone knows. Basically i am not good at sketching graphs so if anyone has a website that might help me find out more about cubic functions and how to graph them, or if anyone can help me out, i'll be thankful.

Thanks.

-

It seems to me that the "gradient method" is really nothing but studying the first derivative of your function. Then,

• the zeros of $f'(x)$ are the extremal points of $f(x)$;
• the sign of $f'(x)$ on different intervals gives you informations about the monotonicity of $f(x)$ on those intervals, thus on the nature of the extremal points (maxima, minima, saddle points).

Before studying the derivative, you can understand the behavior of the cubic at $x\rightarrow \pm\infty$ looking at the sign of the leading coefficient. You can try to factorize its expression to calculate its roots (x-axis intercepts). Easiest of all, $f(0)$ (the 0-th order coefficient) is already the y-axis intercept.

Even if you aren't able to factorize $f(x)$, looking at its sign and monotonicity intervals gives you hints about where looking for roots, exploiting the continuity of the function. Then you can use some numerical methods to find them.

-
Sorry, a little bit of mistake there. It is supposed to be f(x)=3x^2+2x+1, and what i mean by the gradient is the differentiation. –  Shehan Fernando Sep 18 '12 at 22:03
No problem: indeed, the ordinary first derivative could be seen as a one dimensional gradient! What about the rest? Is it clear to you? Do you need extra information? –  Andrea Orta Sep 18 '12 at 22:54

I used to think that the Gradient Method is for plotty functions in 2 variables. However, this answer may give you some pointers.

You could start by examining the function domain. In your case, all $x$ values are valid candidates. next, set $x=0$ then $y=0$ to get the intercepts. Setting $x=0$, yields $y=2$, so the point $(0,2)$ is on your graph. Now setting $y=0$ means that you need to solve the following for $x$:

$$x^3+x^2+x+2=0$$

Solving such equations is sometimes obvious at least for the first root, but in this case, it is not. You either follow a numeric method or use a calculator such as Cubic Eqn Solver or use the formula in Wolfarm-Cubic equation formula or Wiki-Cubic Function.

To get a plot of the function we'll just use the real root value found be either the above methods so the point $(-1.35320,0)$ is on the function graph as well. Note that the other 2 roots are complex, hence the function intersects the x-axis only once.

No we can move to find the critical points so that you can determine concavity of the function. Using the derivative method for testing, you can determine the local minimum and maximum of the function. The subject is a bit lengthy to include in detail here. I suggest you read about it in a book such as (page 191 and above) of: Google Books - Calculus of single variable.

In your case, the first derivative has no real roots. The second derivative

$$6x+2=0$$

has a root at $x=-0.333$, this indicates that $(-0.333,1.741)$ is a point of inflection.

To further study the shape, take 2 points immediately before and after the point of inflection to determine the shape of the curve around this point. Use the obtained information so far together with few other points to determine the approximate curve shape.

There is a free web based graph plotter at: Desmos-Graph Plotter - Calculator, that may be useful for you also.

Here is a sample showing the function and its first derivative:

-
Sorry, a little bit of mistake there. It is supposed to be f(x)=3x^2+2x+1, and what i mean by the gradient is the differentiation. –  Shehan Fernando Sep 18 '12 at 22:04
I know that $derivative=3x^2+2x+1$. But this is not the one you are after, you are after plotting the one with the power 3, is that so? –  Emmad Kareem Sep 18 '12 at 22:39