Pages

Showing posts with label roots. Show all posts
Showing posts with label roots. Show all posts

Sunday, August 24, 2014

Solution of a cubic equation (Part 2)

In the post Solution of a cubic equation Part 1 we found the solution of a cubic equation for a particular condition. Then, in the post Whether real or complex (Cubic Equation) we studied when the roots of a cubic equation will be real and when it will be complex. This post deals with the solution of cubic equation. The algebraic method of solving cubic equations is supposed to be due to the Italian, del Ferro (1465-1526). But it is called Cardano's method because it became known to people after the Italian, Girolamo Cardano, published it in 1545 in his 'Ars Magna'.

Omar Khayyam gave a great deal of thought to the cubic equations. Before him, Greek mathematicians obtained solutions for third degree equations by considering geometric methods that involved the intersection of conics. Although the solution is present but I am searching for a solution of cubic equation with almost a new perspective. I will continue my search but I am giving this method so that until I find my kind of solution the traditional solution is present on my blog.

Let us consider the equation (ax3 + bx2 + cx + d = 0 ; a≠0)

Step 1: Express ax3 + bx2 + cx + d = 0
as x3 + px2 + qx + r = 0

Step 2: Shift the middle point of the curve on the axis x=−p/3.
Read post Solution of a cubic equation. A special solution and Why -b/3a? for detail.
x3 + 3(p/3)x2 + 3(p2/9)x + p3/27 − 3(p2/9)x − p3/27 +qx+ r = 0
(x + p/3)3 − [3(p2/9) − q]x − p3/27 + r = 0
(x + p/3)3 − [p2/3 − q]x − p3/27 + r = 0


Step 3:  Let x + p/3 = y then x = y − p/3.
Substitute y and (y − p/3) for (x + p/3) and x in the above equation.
y3 +[q − p2/3](y − p/3) + r − p3/27 = 0
y3 +[q − p2/3]y − [qp/3 − p3/9 − r + p3/27] = 0
y3 +[q − p2/3]y + [r − qp/3 + 2p3/27] = 0
y3 +[q − p2/3]y + [2p3/27 − qp/3 + r] = 0


Step 4: Now the equation is of the form y3 + Ay + B = 0
where A = q − p2/3 and B = 2p3/27 − qp/3 + r
Let y = (s − A/3s)
then s3 − A3/(3s)3 − As + A2/3s + As − A2/3s + B = 0
s3 − A3/(3s)3 + B = 0
Multiplying throughout by s3, we get
s6 + Bs3 − A3/27 = 0
Let, s3 = z
z2 + Bz − A3/27 = 0
z = [−B ±√(B2 + 4A3/27)]/2


s13 = [−B +√(B2 + 4A3/27)]/2
As we know that any equation has three cube roots. Let its cube root be s1. then the roots are s1, ωs1 and ω2s1.
Similarly,
s23 = [−B −√(B2 + 4A3/27)]/2
Let its cube root be s2. then the roots are s2, ωs2 and ω2s2.
1/s13 = −(3s2/A)3
⇒ 1/s13 = 1/[−B +√(B2 + 4A3/27)]/2
= {[−B − √(B2 + 4A3/27)]/2}/{[−B −√(B2 + 4A3/27)][−B +√(B2 + 4A3/27)]/4}
= {[−B − √(B2 + 4A3/27)]/2}/{−4A3/(27×4)}
= {[−B − √(B2 + 4A3/27)]/2}/{A3/27)}
= −(3s2/A)3
s1s2 = −A/3
If we consider s1 then −A/3s1 = s2.
The product of s1 and s2 is real so the possibilities of the roots for y (= s − A/3s) are
s1 + s2, (ωs1 + ω2s2) and (ω2s1 + ωs2).


Step 5: Shift the graph to the original position for the roots.
The three roots are
s1 + s2 − p/3, (ωs1 + ω2s2 − p/3) and (ω2s1 + ωs2 − p/3).

The solution of the equation
x3 + px2 + qx + r = 0 is
s1 + s2 − p/3, (ωs1 + ω2s2 − p/3) and (ω2s1 + ωs2 − p/3).

Where ω is a cube root of 1 i.e (−1 + i√3)/2
Where s1 is a cube root of [−B +√(B2 + 4A3/27)]/2 and
s2 is a cube root of [−B − √(B2 + 4A3/27)]/2.
and
where A = q − p2/3 and B = 2p3/27 − qp/3 + r

Sunday, August 17, 2014

Whether real or complex (Cubic Equation)

This post deal with the conditions to check whether the roots are real or complex of a cubic equation. A cubic equation always has a real root. The other two roots are real or complex according as the graph cuts the x axis in one or three positions. If the graph touches the x-axis then two roots are equal. If the graph cuts the x-axis in three positions then all the roots are real. If the graph cuts the x-axis in one position then other two roots are complex. When we look at the graph of a general cubic equation we see a cup like structure and a cap like structure. The base of the cup like structure gives local minima and the top of cap like structure gives local maxima. Let us find the positions where the curve bends and changes its direction. We call the cup like structure concave upward and a cap like structure convex upward. The quadratic equation is ax3 + bx2 + cx + d = 0. Let it be equal to y or f(x). y = ax3 + bx2 + cx + d. Now the rate of change of curve is f '(x) = 3ax2 + 2bx + c. f(x) is differentiated to obtain f '(x). We again differentiate f '(x) to obtain f ''(x),

f ''(x) = 6ax + 2b
f ''(x) = 6a(x + b/3a)

Let us check, for what values of x it may give maxima and for what values it may give minima.
There are four cases for it and is given in the following table

f ''(x)xastate
> 0x < (−b/3a)a < 0minima
< 0x > (−b/3a)a < 0maxima
< 0x < (−b/3a)a > 0maxima
> 0x > (−b/3a)a > 0minima

When the local maxima and and local minima are on opposite sides of x-axis then all the roots are real.

Let us find the x-coordinate of maxima or minima. It is when f '(x)=0.

Solving 3ax2 + 2bx + c = 0 we get
x = [−2b±√(4b2 − 12ac)]/6a
x = [−b±√(b2 − 3ac)]/3a
or
x1 = [−b+√(b2 − 3ac)]/3a
and
x2 = [−b−√(b2 − 3ac)]/3a
 
Find the value of y for x1 and x2, substituting them in place of x.

For x1 we get y1 = [4b3 − 15abc + 27a2d + (6ac − 2b2)√(b2 −3ac)]/27a2

For x2 we get y2 = [4b3 − 15abc + 27a2d − (6ac − 2b2)√(b2 −3ac)]/27a2

Now local maxima and local minima lie on the opposite sides of the x-axis when y1 and y2 lie on the opposite sides of x-axis. This will happen when they are of opposite sign.

Now four cases arise:
y1y2Remark
y1< 0y2< 0One root is real and other two are complex.
Graph of  y = x3 + 4x2 + 4x − 7
y1< 0y2> 0All the three roots are real.
 Graph of y = x3 + 6x2 + 4x − 7
If y1 = 0 or y2 = 0 then there are two equal roots
and it may be
  [−b+√(b2 − 3ac)]/3a or [−b-√(b2 − 3ac)]/3a
y1> 0y2< 0All the three roots are real.
Graph of y = − x3 + 4x2 + 4x − 7
If y1 = 0 or y2 = 0 then there are two equal roots.
and it may be
  [−b+√(b2 − 3ac)]/3a or [−b-√(b2 − 3ac)]/3a
y1> 0y2> 0One root is real and other two are complex.
Graph of y = x3 + 4x2 + 4x + 7

When (b2 − 3ac) is less than zero then y1 and y2 are complex and there is no maxima and minima. Then the equation has only one real root and other two are complex. See the graph for 3x2 + 2x2 + 3x + 4 = 0.
Where (b2 − 3ac) = (4 − 27) < 0.



When y1 or y2 is equal to zero then there are two equal roots.

Friday, May 30, 2014

Quadratic equation

A quadratic expression when equated to zero is called a quadratic equation. A quadratic equation looks like this ax2 + bx + c = 0. In this post I will show you a method which is very good to find the solution of a quadratic equation. I found this method.Let us look at the method.

ax2 + bx + c = 0

We can write it as,
(x + b/a)x + c/a = 0
or (x + b/a)x = -c/a

Let A = x + b/a and B = x
Then,A-B = b/a, AB = -c/a and A+B = 2x + b/a
Applying the identity (A+B)2 = (A-B)2 + 4AB
(2x + b/a)2 = (b/a)2 - 4c/a = (b2 - 4ac)/a2
2x + b/a = ±(1/a)√(b2 - 4ac)
x = (-b ± √(b2 - 4ac))/2a

As we can see there are two values which satisfy the equation hence the number of solutions is two and there are two roots. As the solutions of a quadratic equation are called roots.

Let us analyze the roots i.e. when they are real. The value under the square root is positive if b2 - 4ac is positive. When such condition arises then the roots are real. The value b2 - 4ac is called the discriminant. If the discriminant is equal to zero then both the roots are equal. If the discriminant is negative then both the roots are imaginary and they occur in conjugate pairs. If the roots are real and distinct then the graph cuts the x-axis at two different points. If the roots are real and equal then the graph cuts the x-axis at one point. If the roots are imaginary then the graph does not cut the x-axis.

The graph below shows two real roots.
x2 + 5x - 2 = 0
The graph below shows two real roots
x2 + 5x + 6.25 = 0
The graph below represents when roots are imaginary.
x2 + 5x + 8 = 0


Tuesday, May 27, 2014

Solution is a solution

Let us start with two equations
  1. ax + b = 0
  2. ax2 + bx + c = 0
Among the above two equations one is linear and the other is quadratic. The solution of the linear equation is x = -b/a and the solution of the quadratic is (1/2a)(-b±√(b2 - 4ac)). The point which I want to state is that the solution of a quadratic equation contains the solution of a linear equation. When we substitute c for zero in the quadratic equation then we get ax2 + bx = 0. On factorizing we get (ax + b) = 0 and x = 0. Whose solutions are x = -b/a and 0. -b/a is the solution of ax + b = 0. And x = 0 comes because x is multiplied throughout to get the equation ax2 + bx = 0.

Now according to me if solution of cubic exist then it must have the solution of quadratic contained in it. Similar is the case for the others. Let us compute the solution of a cubic equation when one root is known

The equation is ax3 + bx2 + cx + d =0. If the roots are α, β and γ and γ is known then
α + β + γ = -b/a
αβ + βγ + γα = c/a
αβγ = -d/a
Expressing sum of two roots in terms of third
α + β = -b/a - γ
Expressing product of two roots in terms of third
αβ = c/a - (βγ + γα)
αβ = c/a - γ(β + α)
αβ = c/a - γ(-γ - b/a)
αβ = c/a + γ2 + bγ/a
(α - β)2 = (α + β)2 - 4αβ
(α - β)2 = (-b/a - γ)2 - 4(c/a + γ2 + bγ/a)
(α - β)2 = (-b/a)2 + (γ)2 + 2bγ/a - 4c/a - 4γ2 - 4bγ/a
(α - β)2 = b2/a2 - 4c/a - 3(γ)2 - 2bγ/a
α - β = ±√[(b2 - 4ac)/a2 - 3(γ)2 - 2bγ/a]
adding α - β and α + β
2α or 2β = -b/a - γ ± √[(b2 - 4ac)/a2 - 3(γ)2 - 2bγ/a]
α or β = -b/2a - γ/2 ± (1/2a)√[(b2 - 4ac) - 3a2(γ)2 - 2baγ]

As we can see when one root γ = 0 and the equation is independent of d then the solution reduces to the solution of a quadratic equation.

Now it can be the solution of 5th degree equation exist and it contains the solution of 4th degree in it.

Friday, May 16, 2014

A cubic gives cubic

I ask you a question and the answer is very simple. But it has a very interesting conclusion in it. The question is "If we take a cubic equation and consider A as one number. Now If we find the difference of the roots from this point A and frame an equation which gives the values. What will we get."

The answer is very simple and is a cubic. The expression will be a cubic because we know that there are three roots and each value will be at a constant distance from the given number A. So there will be three numbers and a cubic equation only gives three values i.e. three numbers when equated to zero.

Now the question arises how can we find that equation. Suppose the equation is f(x) and the number is A. Then, the required equation is
f(x+δ) = f(x) + f'(x)δ /1!+ f''(x)(δ)² /2!+ f'''(x)(δ)³/3! +...

The above equation can be helpful for a cubic if we know one root.

Suppose the equation is f(x) = (x - 1)(x - 2)(x - 3)
= x³ - 6x² + 11x - 6

Now as 1 is a root then
f(1+δ) = f(1) + f'(1)δ/1! + f''(1)(δ)² /2!+ f'''(1)(δ)³/3!
f(1+δ) = f(1) + (3x2 - 12x + 11)δ + (6x - 12)(δ)²/2 + 6(δ)³/6   x=1
f(1+δ) = 2δ - 3δ² + δ³
f(1+δ) = δ(2 - 3δ + δ²)
For the other roots f(1+δ) = 0 So,
Solving, δ(2 - 3δ + δ²) = 0
we get, δ = 0,1,2. Hence the roots are 1,2,3.

Monday, April 28, 2014

Bisection Method

There are many methods to find the roots by approximation and one of it is bisection method. This method uses the intermediate value theorem which states that if a continuous curve changes sign then it must have taken zero at some point.

We take the given function f(x) and two values a and b such that f(a)·f(b) < 0. Then we bisect the values a and b. Let it be c. c = (b-a)/2. If f(c)=0 then c is the root else if f(a)·f(c)<0 then b=c else a=c. We continue the same procedure again. This method converges very slowly.

The property of this method is that it does not use the value of f(x) as the formula to compute the root.

Saturday, March 29, 2014

Finding roots by approximations

On looking at the graph of a polynomial, we find that the graph cuts the x axis at certain points if it has real roots. We can use derivatives to find the roots of the equation formed from the polynomial.

In this method we first take a equation (f(x) = 0) whose root we have to find. Then we take a value x1. For that value of x we find the value (y1) of the corresponding expression. We find the derivative of the expression (f'(x)). Then we find the value of the slope (m1)at that point . We find the equation of a line
[(y − y1) = m (x − x1)].
Then we find the abscissa (x2) of intersection of the x-axis and the curve. We follow the same process again for the x2.

This method works very well for quadratic equation. It can work well for cubic equation and may work well for others. The problem which arises in this case is the value of x found. If the value of x found approaches the root then the method works well. There are many cases which arises when we find root by this method. The most favorable case is when we approach the root continuously i.e. every x with odd subscript moves in one direction only i.e. each successive odd term either becomes greater or either it becomes less of its previous. Each term with even subscript becomes greater if its corresponding even term is less and vice-verse. Then we will certainly approach the root.

Let us find the roots for a quadratic equation:

Enter a quadratic Equation:
x2 + x + = 0.
Input a value to start:

Input the number of iterations: