Question

In: Advanced Math

Use Muller's method to find a solution in [0.1, 1] accurate to within 600x^4−550x^3+200x^2−20x−1=0. Explain how...

Use Muller's method to find a solution in [0.1, 1] accurate to within 600x^4−550x^3+200x^2−20x−1=0. Explain how the algorithm works.

Solutions

Expert Solution

IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE TTHERE TO HELP YOU..ALL THE BEST..

AS FOR GIVEN DATA...

#include<stdio.h>
#include<conio.h>
#include<math.h>
#define ESP 0.001
#define F(x) (x)*(x)*(x) + 2*(x)*(x) + 10*(x) - 20

void main()
{
  double x1,x2,x3,x4_1,x4_2,fx1,fx2,fx3,
     h1,h2,h3_1,h3_2,h4,D,d1,d2,a1,a2,a0;
  int i=1;
  clrscr();
  printf("\nEnter the value of x1: ");
  scanf("%lf",&x1);
  printf("\nEnter the value of x2: ");
  scanf("%lf",&x2);
  printf("\nEnter the value of x3: ");
  scanf("%lf",&x3);
  fx1 = F(x1);
  printf("\n\n f(x1) = %lf",fx1);
  getch();
  fx2 = F(x2);
  printf("\n\n f(x2) = %lf",fx2);
  getch();
  fx3 = a0 = F(x3);
  printf("\n\n f(x3) = %lf",fx3);
  getch();
  h1 = x1-x3;
  h2 = x2-x3;

  d1 = fx1-fx3;
  d2 = fx2-fx3;

  D = h1*h2*(h1-h2);

  a1 = (d2*h1*h1 - d1*h2*h2)/D;
  a2 = (d1*h2 - d2*h1)/D;

  h3_1 = -((2*a0)/(a1 + sqrt(fabs(a1*a1 - (4*a2*a0)))));
  h3_2 = -((2*a0)/(a1 - sqrt(fabs(a1*a1 - (4*a2*a0)))));

  if( (a1 + sqrt(fabs(a1*a1 - (4*a2*a0)))) >
         ((a1 - sqrt(fabs(a1*a1 - (4*a2*a0))))) )
  {
   h4 = h3_1;
  }
  else
  {
   h4 = h3_2;
  }
  x4_1 = x3 + h4;
  printf("\n\n\n x4 = %lf \n",x4_1);

  x1=x2;
  x2=x3;
  x3=x4_1;
  printf("\n\nx1 = %lf",x1);
  printf("\n\nx2 = %lf",x2);
  printf("\n\nx3 = %lf",x3);
  getch();

  do
  {
   fx1 = F(x1);
   fx2 = F(x2);
   fx3 = a0 = F(x3);

   h1 = x1-x3;
   h2 = x2-x3;

   d1 = fx1-fx3;
   d2 = fx2-fx3;

   D = h1*h2*(h1-h2);

   a1 = (d2*h1*h1 - d1*h2*h2)/D;
   a2 = (d1*h2 - d2*h1)/D;

   h3_1 = -((2*a0)/(a1 + sqrt(fabs(a1*a1 - (4*a2*a0)))));
   h3_2 = -((2*a0)/(a1 - sqrt(fabs(a1*a1 - (4*a2*a0)))));

   if( (a1 + sqrt(fabs(a1*a1 - (4*a2*a0)))) >
         (a1 - sqrt(fabs(a1*a1 - (4*a2*a0)))) )
   {
    h4 = h3_1;
   }
   else
   {
    h4 = h3_2;
   }
   x4_2 = x3 + h4;
   printf("\n\n\n x4 = %lf \n",x4_2);
   getch();
   if(fabs(x4_1 - x4_2) < ESP)
   {
    printf("\n\nREAL ROOT = %.3lf",x4_2);
    i=0;
   }
   else
   {
     x4_1=x4_2;
     x1=x2;
     x2=x3;
     x3=x4_1;
     printf("\n\nx1 = %lf",x1);
     printf("\n\nx2 = %lf",x2);
     printf("\n\nx3 = %lf",x3);
   }
  }while(i!=0);
getch();
}

/*
____________________________

     OUT PUT
____________________________


Enter the value of x1: 0

Enter the value of x2: 1

Enter the value of x3: 2


 f(x1) = -20.000000

 f(x2) = -7.000000

 f(x3) = 16.000000


 x4 = 1.354066


x1 = 1.000000

x2 = 2.000000

x3 = 1.354066


 x4 = 1.368647


x1 = 2.000000

x2 = 1.354066

x3 = 1.368647


 x4 = 1.368808


REAL ROOT = 1.369


*/

Code for MULLER'S METHOD in C Programming

#include<stdio.h>
#include<conio.h>
#include<math.h>
#define ESP 0.001
#define F(x) (x)*(x)*(x) + 2*(x)*(x) + 10*(x) - 20

void main()
{
  double x1,x2,x3,x4_1,x4_2,fx1,fx2,fx3,
     h1,h2,h3_1,h3_2,h4,D,d1,d2,a1,a2,a0;
  int i=1;
  clrscr();
  printf("\nEnter the value of x1: ");
  scanf("%lf",&x1);
  printf("\nEnter the value of x2: ");
  scanf("%lf",&x2);
  printf("\nEnter the value of x3: ");
  scanf("%lf",&x3);
  fx1 = F(x1);
  printf("\n\n f(x1) = %lf",fx1);
  getch();
  fx2 = F(x2);
  printf("\n\n f(x2) = %lf",fx2);
  getch();
  fx3 = a0 = F(x3);
  printf("\n\n f(x3) = %lf",fx3);
  getch();
  h1 = x1-x3;
  h2 = x2-x3;

  d1 = fx1-fx3;
  d2 = fx2-fx3;

  D = h1*h2*(h1-h2);

  a1 = (d2*h1*h1 - d1*h2*h2)/D;
  a2 = (d1*h2 - d2*h1)/D;

  h3_1 = -((2*a0)/(a1 + sqrt(fabs(a1*a1 - (4*a2*a0)))));
  h3_2 = -((2*a0)/(a1 - sqrt(fabs(a1*a1 - (4*a2*a0)))));

  if( (a1 + sqrt(fabs(a1*a1 - (4*a2*a0)))) >
         ((a1 - sqrt(fabs(a1*a1 - (4*a2*a0))))) )
  {
   h4 = h3_1;
  }
  else
  {
   h4 = h3_2;
  }
  x4_1 = x3 + h4;
  printf("\n\n\n x4 = %lf \n",x4_1);

  x1=x2;
  x2=x3;
  x3=x4_1;
  printf("\n\nx1 = %lf",x1);
  printf("\n\nx2 = %lf",x2);
  printf("\n\nx3 = %lf",x3);
  getch();

  do
  {
   fx1 = F(x1);
   fx2 = F(x2);
   fx3 = a0 = F(x3);

   h1 = x1-x3;
   h2 = x2-x3;

   d1 = fx1-fx3;
   d2 = fx2-fx3;

   D = h1*h2*(h1-h2);

   a1 = (d2*h1*h1 - d1*h2*h2)/D;
   a2 = (d1*h2 - d2*h1)/D;

   h3_1 = -((2*a0)/(a1 + sqrt(fabs(a1*a1 - (4*a2*a0)))));
   h3_2 = -((2*a0)/(a1 - sqrt(fabs(a1*a1 - (4*a2*a0)))));

   if( (a1 + sqrt(fabs(a1*a1 - (4*a2*a0)))) >
         (a1 - sqrt(fabs(a1*a1 - (4*a2*a0)))) )
   {
    h4 = h3_1;
   }
   else
   {
    h4 = h3_2;
   }
   x4_2 = x3 + h4;
   printf("\n\n\n x4 = %lf \n",x4_2);
   getch();
   if(fabs(x4_1 - x4_2) < ESP)
   {
    printf("\n\nREAL ROOT = %.3lf",x4_2);
    i=0;
   }
   else
   {
     x4_1=x4_2;
     x1=x2;
     x2=x3;
     x3=x4_1;
     printf("\n\nx1 = %lf",x1);
     printf("\n\nx2 = %lf",x2);
     printf("\n\nx3 = %lf",x3);
   }
  }while(i!=0);
getch();
}

/*
____________________________

     OUT PUT
____________________________


Enter the value of x1: 0

Enter the value of x2: 1

Enter the value of x3: 2


 f(x1) = -20.000000

 f(x2) = -7.000000

 f(x3) = 16.000000


 x4 = 1.354066


x1 = 1.000000

x2 = 2.000000

x3 = 1.354066


 x4 = 1.368647


x1 = 2.000000

x2 = 1.354066

x3 = 1.368647


 x4 = 1.368808


REAL ROOT = 1.369


*/

HOPE IT HELPS YOU

RATE THUMBSUP IT HELPS ME ALOT

THANKS


Related Solutions

Numerical Analysis: Use Muller's method to find a solution in [0.1, 1] accurate to within 600x^4−550x^3+200x^2−20x−1=0....
Numerical Analysis: Use Muller's method to find a solution in [0.1, 1] accurate to within 600x^4−550x^3+200x^2−20x−1=0. Explain how the algorithm works. Please show table with all values, not just the final root value.
1. Use the Laplace transform to solve the initial value problem. ?"+4?′+3?=1−?(?−2)−?(?−4)+?(?−6), ?(0)=0, ?′(0)=0 2. Use...
1. Use the Laplace transform to solve the initial value problem. ?"+4?′+3?=1−?(?−2)−?(?−4)+?(?−6), ?(0)=0, ?′(0)=0 2. Use the Laplace transform to solve the initial value problem. ?"+4?=?(?), ?(0)=1, ?′(0)=−1     = { 1, ? < 1 where ?(?) =   {0, ? > 1.
Consider the following data: x -4 -3 -2 -1 0 P(X=x) 0.2 0.1 0.2 0.1 0.4...
Consider the following data: x -4 -3 -2 -1 0 P(X=x) 0.2 0.1 0.2 0.1 0.4 Step 2 of 5 : Find the variance. Round your answer to one decimal place. Step 3 of 5 : Find the standard deviation. Round your answer to one decimal place.
A= 1 2 4 0 1 -2 -1 0 1 2 0 3 8 1 4...
A= 1 2 4 0 1 -2 -1 0 1 2 0 3 8 1 4 . Let W denote the row space for A. (a) Find an orthonormal basis for W and for W⊥. (b) Compute projW⊥(1 1 1 1 1 ).
exampleInput.txt 1 2 3 0 2 3 4 0 1 3 5 0 1 2 6...
exampleInput.txt 1 2 3 0 2 3 4 0 1 3 5 0 1 2 6 1 5 6 8 2 4 6 7 3 4 5 9 10 5 8 9 4 7 9 6 7 8 6 How can I detect when 'cin' starts reading from a new line. The amount of numbers in each row is unknown. I need them in type 'int' to use the data.
x P(x) 0 0.15 1 0.1 2 0.3 3 0.45 Find the mean of this probability...
x P(x) 0 0.15 1 0.1 2 0.3 3 0.45 Find the mean of this probability distribution. Round your answer to one decimal place. 2 x P(x) 0 0.05 1 0.15 2 0.25 3 0.55 Find the standard deviation of this probability distribution. Give your answer to at least 2 decimal places 3 2.36 Is it worth it?: Andy is always looking for ways to make money fast. Lately, he has been trying to make money by gambling. Here is...
Assuming that x>0, use the method of reduction of order to find a second solution to...
Assuming that x>0, use the method of reduction of order to find a second solution to x^2y''−3xy'+4y=0 Given y1(x)=x^2
Let y′=y(4−ty) and y(0)=0.85. Use Euler's method to find approximate values of the solution of the...
Let y′=y(4−ty) and y(0)=0.85. Use Euler's method to find approximate values of the solution of the given initial value problem at t=0.5,1,1.5,2,2.5, and 3 with h=0.05. Carry out all calculations exactly and round the final answers to six decimal places.
0. 0. 0. 0.0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 2. 2. 2. 3. 4.
0. 0. 0. 0.0. 0. 0. 0. 0.   1. 1. 1. 1. 1. 1. 2. 2. 2. 3.   4. A.)MEAN – B.)MEDIAN - C.)MODE - D.)STANDARD DEVIATION – E.)5 NUMBER SUMMARY – F.)BOX AND WHISKERS PLOT – G.) OUTLIERS-
0. 0. 0. 0.0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 2. 2. 2. 3. 4.
0. 0. 0. 0.0. 0. 0. 0. 0.   1. 1. 1. 1. 1. 1. 2. 2. 2. 3.   4. A.)5 NUMBER SUMMARY – B.)BOX AND WHISKERS PLOT – C.) OUTLIERS-
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT