You are on page 1of 5

Problem No.

1 (Using quadratic equation solver program)


(i)
Enter a=3.2156
Enter b=6
Enter c=2.798855
x1 = -0.9325
x2 = -0.9334
Roots are real and unequal

(ii)
enter a=1
enter b=100
enter c=0.0001
x1 = -1.0000e-006
x2 = -100.0000
Roots are real and unequal

(iii)
enter a=4
enter b=24
enter c=5
x1 = -0.2161
x2 =-5.7839
Roots are real and unequal

Problem No. 2 (Using Newton Solver program with initial guess x=2)
Tolerance used =10-10
(i)
enter a=3.2156
enter b=6
enter c=2.798855
step

dx
1.466476

f(x)

1.000000

0.533524

6.915314

2.000000

-0.199714

0.733238

1.728828

3.000000

-0.566333

0.366619

0.432207

4.000000

-0.749642

0.183309

0.108052

5.000000

-0.841296

0.091654

0.027013

6.000000

-0.887123

0.045827

0.006753

7.000000

-0.910036

0.022912

0.001688

8.000000

-0.921490

0.011454

0.000422

9.000000

-0.927213

0.005723

0.000105

10.000000

-0.930067

0.002854

0.000026

11.000000

-0.931478

0.001411

0.000006

12.000000

-0.932154

0.000676

0.000001

13.000000

-0.932440

0.000286

0.000000

14.000000

-0.932520

0.000080

0.000000

15.000000

-0.932527

0.000007

0.000000

16.000000

-0.932528

0.000000

0.000000

17.000000

-0.932528

0.000000

0.000000

Root is, x = -0.932528

(ii)
enter a=1
enter b=100
enter c=0.0001
step

dx

f(x)

1.000000

1.734026

0.265974

176.409587

2.000000

0.029060

1.704967

2.906912

3.000000

0.000007

0.029052

0.000844

4.000000

-0.000001

0.000008

0.000000

5.000000

-0.000001

0.000000

0.000000

Root is, x= - 0.000001 or -10-6

(iii)
enter a=4
enter b=24
enter c=5
step

dx

f(x)

1.000000

1.308469

0.691531

43.251608

2.000000

0.053626

1.254843

6.298522

3.000000

-0.204204

0.257830

0.265905

4.000000

-0.216092

0.011889

0.000565

5.000000

-0.216118

0.000025

0.000000

6.000000

-0.216118

0.000000

0.000000

7.000000

-0.216118

0.000000

0.000000

Root is, x = -216118

Problem No. 3 (Using Newton Solver for cubic equation with initial guess x=2)
The given equation is : x3-3x2+3x-1
Tolerance used = 10-10
step

dx

f(x)

1.000000

1.666667

0.333333

0.296296

2.000000

1.444444

0.222222

0.087791

3.000000

1.296296

0.148148

0.026012

4.000000

1.197531

0.098765

0.007707

5.000000

1.131687

0.065844

0.002284

6.000000

1.087791

0.043896

0.000677

7.000000

1.058528

0.029264

0.000200

8.000000

1.039018

0.019509

0.000059

9.000000

1.026012

0.013006

0.000018

10.000000

1.017342

0.008671

0.000005

11.000000

1.011561

0.005781

0.000002

12.000000

1.007707

0.003854

0.000000

13.000000

1.005138

0.002569

0.000000

14.000000

1.003425

0.001713

0.000000

15.000000

1.002284

0.001142

0.000000

16.000000

1.001522

0.000761

0.000000

17.000000

1.001015

0.000507

0.000000

18.000000

1.000677

0.000338

0.000000

19.000000

1.000451

0.000226

0.000000

20.000000

1.000301

0.000150

0.000000

21.000000

1.000200

0.000100

0.000000

22.000000

1.000134

0.000067

0.000000

23.000000

1.000089

0.000045

0.000000

24.000000

1.000059

0.000030

0.000000

25.000000

1.000040

0.000020

0.000000

26.000000

1.000027

0.000013

0.000000

27.000000

1.000018

0.000008

0.000000

28.000000

1.000012

0.000006

0.000000

29.000000

1.000008

0.000004

0.000000

30.000000

1.000008

0.000000

0.000000

Root is, x=1.000008

You might also like