Reference no: EM132397220
Assigmmemt om Nonlinear Equations
1. One classical method for solving cubics is Cardano's solution. The cubic equation x3 + ax2 + bx + c = 0 is transformed to a reduced form y3 + py + q = 0 by the substitution x = y - a/3. The coefficients in the reduced form are p = b -a2/3, q = c -ab/3 + 2(a/3)3.
A real root of the reduced form is given by y1 = [-q/2 + s]1/3 + [-q/2 -s]1/3, where s = [(p/3)3 + (q/2)2]1/2. Then a real root of the original equation is given by x1 = y1 -a/3. The other two roots can be found by similar formulas or by factovsng out x1 (deflating x1) and solving the resulting quadratic equation.
Using Matlab do the following:
(a) Apply Cardano's method to find the real root of x3 + 3x2 + δ2x + 3δ2 = 0, for various values of δ. Investigate the loss of accuracy from roundoff for large δ = 1010:19, observe the results when δ is about the reciprocal of machine unit.
(b) Apply Newton's method to the same equation for the same values of δ. Investigate the effects of roundoff error and the choice of starting value. Explain the rapid convergence of Newton's method for very large δ.
2. Consider the ecliptic which is the plane of the Earth's orbit around the Sun with the Sun at the origin (0, 0) occupying one of the foci of the Earth‘s elliptical orbit. Also assume that Mercury's orbit is on the same plane, and let
xM (t) = -11.9084 + 57.9117 cos(2Πt/87.97)
yM(t) = 56.6741 sin(2Πt/87.97)
xE(t) = -2.4987 + 149.6040 cos(2Πt/365.25)
yE(t) = 149.5832 sin(2Πt/365.25)
be the coordinates of Mercury (M) and Earth (E) at time t (in Earth days). The planets M, E are in Opposstson if they, along with Sun (S) appear on the same line, with the Sun in the middle, that is M-S-E. They are in Gonjunctson if the Sun appears on the edge, that is S-M-E. Assuming that M and E are in conjunctson at t = 0, which is what the equations imply, write Matlab code that will use the Secant method to compute the time of 10 consecutive Opposstsons and the spacing between them (in Earth days). Produce a table with these information. The code should include a Matlab function that will accept as input a function, say f (x), two initial approximations of a possible root and a tolerance and will produce the root.
Note that you are basically asked to compute ten roots of a specific nonlinear equation that you should generate. Although initial approximations for every root should be found, the possibility of finding a pattern that may lead to the initial approximation of more than one roots (perhaps all) should be investigated.