Is Trial and Error the Only Method to Solve Cubic Equations?

  • Thread starter calky360
  • Start date
  • Tags Tags
    Error trial
4 replies · 3K views · last reply
calky360
Messages
1
Reaction score
0
So I have pretty much finished the question, trying to determine "B" this is where i am at.

294/B^2 = 102.61B + 250.47

I found a very similar question in a book and they just skipped straight to answer saying trial and error was used.

Using trial and error I got approximately 0.92, however I'm not sure if this is a sufficient method to get full marks.

Any other way this can be solved that isn't trial and error?

Regards Callum.
 
If you plot the lhs and rhs on a common graph, you will find it has only one (real) solution.

Graph of two curves on shared axes from x = -3 to 3 and y from 0 to 1200: a blue curve with vertical asymptotes near x = -0.5 and x = 0.5, and a red straight line rising gently from left to right.

Then, you can use a numerical method to find an approximate numerical solution, which seems fine because the coefficients are also given with finite precision. Specifically, you could use the iterative method. Solve for the [itex]B[/itex] on the lhs:

[tex] B = \sqrt{\frac{294}{102.61 B + 250.47}} \equiv \varphi(B)[/tex]

Take an initial guess [itex]B = 1[/itex] (the rhs is positive then) and use the iterative procedure to get successive approximations:

[tex] B^{(n + 1)} = \varphi(B^{(n)})[/tex]

We get:

[tex] \begin{align*}<br /> B^{(1)} = 0.912508894 \\<br /> <br /> B^{(2)} = 0.924335701 \\<br /> <br /> B^{(3)} = 0.92271007 \\<br /> <br /> B^{(4)} = 0.922933009 \\<br /> <br /> B^{(5)} = 0.922902426 \\<br /> <br /> B^{(6)} = 0.922906621 \\<br /> <br /> B^{(7)} = 0.922906046 \\<br /> <br /> B^{(8)} = 0.922906125 \\<br /> <br /> B^{(9)} = 0.922906114 \\<br /> <br /> B^{(10)} = 0.922906115 \\<br /> <br /> B^{(11)} = 0.922906115 \\<br /> \end{align*}[/tex]

In just 10 iterations we arrived at the numerical solution with 9 decimal places! You can use this solution to see that the original equation is satisfied.

EXTRA QUESTION:
Try to see what you would have gotten if you had used an iterative function obtained by solving for the [itex]B[/itex] found in the r.h.s. of your original equation!
 
Attachments
  • Graph of two curves on shared axes from x = -3 to 3: a blue curve with vertical asymptotes near x = -0.5 and x = 0.5 rising toward 1200 on both sides, and a red straight line rising gently from near 0 at x = -3 to about 550 at x = 3.
    plot1.png
    2.3 KB · Views: 757
there's a few method:
Classical mindless trail and error,
Newton Raphson Approx,
Cubic Formula.

I'm using another method:

[tex]F(a)=\int_{0}^{a}f(x)dx[/tex]
For b>a>0

We want to find [tex]\mid F(a) \mid > \mid F(b) \mid[/tex]
For x is in the interval if (a,b)

I've managed to find x is in between 0.92 and 0.925 within seconds...
(Because i know that the value of x is close to [tex]\sqrt{\frac{2.8625}{0.81366..}}=1.083[/tex] , Hence we can use 1.083 for the initial point for Newton method or this interval approx)

I take the mean of 0.92 and 0.925 which is about 0.9225 (U can even narrow the interval)
 
Last edited:
Multiplying by B^2 yields a cubic equation: 294 - 102.61B^3 - 250.47B^2 = 0

Answers must be checked in the original equation as the new equation has no restrictions on B
 
coolul007 said:
Multiplying by B^2 yields a cubic equation: 294 - 102.61B^3 - 250.47B^2 = 0

Answers must be checked in the original equation as the new equation has no restrictions on B

A cubic equation can be solved exactly as is shown on: http://en.wikipedia.org/wiki/Cubic_function.
However, I believe this will be outside the scope of your assigment.