How to draw graph of cubic function

168 Views Asked by At

I am taking a course in calculus and wanted to refresh my memory before the semester starts. And I have been working on drawing graphs from cubic functions. I am not that experienced with LaTex and english is not my first language, so I apologize in advance if some of the question is improperly formulated and some expressions/words are incorrect.

I have this exercise from my old book from high school which goes as follows:

A function G is given by

$G(x)=\frac{1}{3}x^3-x^2+x-\frac{4}{3}$

a) Decide $G'(x)$, and find the monotonic properties for $G$

b) Decide $G''(x)$, and find the curvature for $G$

c) Calculate the turning point and the equation for the tangent of the turning point

d) Draw the graph of $G$ with the tangent of the turning point (this is where I'm having some trouble)

I have solved the task as follows:

a)

$G'(x)=3\frac{1}{3}x^{3-1}-2x^{2-1}+1=x^2-2x+1$

We know from the second quadratic formula that $(a-b)^2=a^2-2ab+b^2$,

thus $G'(x)=(x-1)(x-1)=(x-1)^2$

Monotonic properties:

$(x-1)\leq 0 \,\forall x \in [-\infty,1]$

$(x-1)\geq 0 \,\forall x \in [1,\infty]$

$G'(x)> 0 \,\forall x \in [-1,1]$

We see that $G'(x)$ is growing on the intervall and it only has one nullpoint/saddlepoint, so it should have a shape similar to this:

enter image description here

b)

$G''(x)=(2x-2)=2(x-1)$

$2>0\,\forall x \in [-\infty,\infty]$

$(x-1)\leq 0 \,\forall x \in [-\infty,1]$

$G''(x)\geq 0 \,\forall x \in [1,\infty]$

$G$ curves downwards when $G''(x)<0\,\forall x \in [-\infty,1]$ and upwards when $G''(x)>0\,\forall x \in [1,\infty]$

c)

Formula for tangent:

Let $f$ be double differentiable in a point $x=c$. The tangent $t(x)$ for $f$ in the point $(c, f(c))$ is then given by $t(x)=f'(c)(x-c)+f(c)$

We know from a) that $G'(x)=0$ when $x=1$, thus $G$ has a turning point in $(1,G(1))=(1,-1)$,

$c=1$, and we get

$t(x)=f'(c)(x-c)+f(c)=f'(1)(x-1)+f(1)=(1-1)^2(x-1)+(-1)=-1$

d)

We know that there's a saddle point in $(1,-1)$.

Then we calculate where the graph crosses the $y-axis$ by setting $x=0$:

$G(0)=\frac{1}{3}(0^3)-(0^2)+0-(4/3)=-\frac{4}{3}\,\rightarrow$ in the point $(0,-\frac{4}{3})$

But when I try to calculate where the graph crosses the x-axis by putting $y=0$, I'm couldn't figure out how to simplify the cubic function.

$\frac{1}{3}x^3-x^2+x-\frac{4}{2}$

$x^2(\frac{1}{3}x-1)+(\frac{4}{3})(\frac{3}{4}x-1)$

from here, the factors in the two terms are not the same, so I'm not sure how to proceed. What am I doing wrong here? How do I find the point where the graph crosses the x-axis?

2

There are 2 best solutions below

0
On BEST ANSWER

It's not very obvious how to factor $\frac{1}{3}x^3-x^2+x-\frac{4}{3}$. Multiplying by $3$ we have $x^3-3x^2+3x-4=(x-1)^3-3$. Can you find the root now?

2
On

@Vasili points you towards the closed form solution, which is just slightly hidden by offsets and a gain factor in this toy example. The change of variables gets you the root(s).

However, there are alternatives. One is the general closed form expression to solve cubics, look for the section on Cardano's equation here https://en.wikipedia.org/wiki/Cubic_equation. That's plug and chug like the quadratic equation, but understanding why it works may not be easy for you at this point.

Another alternative: Newton's method. From the monotonicity of the slope you know there's only a single crossing, and checking $x=2$ and $x=3$ shows the graph crosses the x-axis in the interval $[2,3]$. Pick any number $x_0$ in that interval, compute $g(x_0)$ and $g'(x_0)$, and consider what $x_0-\frac{g(x_0)}{g'(x_0)}$ means. You will see that it is the base of a triangle on the x-axis that can be used to shift your initial estimate, $x_0$, towards the root. So make that shifted estimate your next guess, recalculate the value above, get a considerably smaller number still shifting you towards the root. The downside is it is an approximation, the upside is it works in a wide variety of circumstances (not all!), rapidly converges on the root (usually!), and it's pretty easy to see how and why it works.

Edited: to name Newton's method, thanks @AlexM.