Professional Documents
Culture Documents
Numerical Method Using Wolfarm Mathematica
Numerical Method Using Wolfarm Mathematica
Roll No – 21/631
Prac cal 01
1.Find the root of the func on f(x) = x^3 + 2x^2 − 3x − 1 using the Bisec on Method with e =
10^(−5).Also, plot the graph of the func on.
Print["s1[x]=", s1[x]]
s2[x_]:=Exp[x]+x^2-x-4
Print["s2[x]=",s2[x]]
Bisec on[-2,2,10^(-6),20]
Plot[s2[x],{x,-2,2}]
3. Find the root of the func on f(x) = x^3 – x^2 − 10x + 7 using the Bisec on Method with e =
10^(−6)in the interval [−4, 4]. Also, plot the graph of the func on.
s3[x_]:=x^3-x^2-10x+7
Print["s3[x]=",s3[x]]
Bisec on[-4,4,10^(-6),20]
Plot[s3[x],{x,-4,4}]
4. Find the root of the func on f(x) = 1.05−1.04x+ln(x) using the Bisec on Method with e = 10−6
in the interval [0, 2]. Also, plot the graph of the func on.
s4[x_]:=1.05-1.04x+Log[x]
Print["s4[x]=",s4[x]]
Bisec on[0,2,10^(-6),20]
Plot[s4[x],{x,0,2}]
Name – Abhay Kumar
Roll No – 21/631
Prac cal 02
1. Find the root of the func on f(x) = x^3 + 2x^2 − 3x − 1 using the Secant Method with e = 10^(−5)
In the interval [0, 1]. Also, plot the graph of the func on.
f2[x_]:=Log[1+x]-Cos[x]
Secant[1,2,10^(-5),50]
Plot[f2[x],{x,1,2}]
3. Find the root of the func on f(x) = x^3-x^2 + x-1using the Secant Method withe = 10^(-5) in the interval [0,2]
f3[x_]:=x^3-x^2+x-1
Secant[0,2,10^(-5),50]
Plot[f3[x],{x,0,2}]
4. Find the root of the func on f(x) = e^x + x^2- x- 4 using the Regula-Falsi Method with e =10^(-5) in the interval [1, 2].
Also, plot the graph of the func on.
g2[x_] := x^3-x^2-10x+7
Print["g2(x) =",g2[x]];
FalsePosi on[1,2,10^(-5),50]
Plot[g2[x],{x,1,2}]
6. Find the root of the func on f(x) = x^3 + 2*x^2-3x-1 using the Regula-Falsi Method with e = 10^(-5) in the interval
[1,2].Also, plot the graph of the func on
g3[x_] := x^3+2x^2-3x-7
Print["g3(x) =",g3[x]];
FalsePosi on[1,2,10^(-5),50]
Plot[g3[x],{x,1,2}]
Name – Abhay Kumar
Roll No – 21/631
Prac cal 03
1. Find the root of the func on f(x) = x^3 + 2x^2- 3x- 1 using the Newton-Raphson Method with e =
10^(-5) near the point x = 1. Also, plot the graph of the func on.
Print["t1[x]=", t1[x]]
Plot[t1[x], {x, 0, 1}
2.Find the root of the func on f(x) = 1.0 e^x + x^2- x- 4 using the Newton-Raphson Method with e =
10^(-5) near the point x = 1. Also, plot the graph of the func on.
Print["h[x]=", t2[x]]
Print["t3[x]=", t3[x]]
t4[x_] := x^2-2
Print["t4[x]=", t4[x]]
Roll No – 21/631
Prac cal 04
Qus1. Solve the following system of equa ons using Gauss Elimina on method 2x-2y+3z=2, x+2y-z=3,
3x-y+2z=1
mat={{2,-2,3,2},{1,2,-1,3},{3,-1,2,1}}
2.Solve the following system of equa ons using Gauss-Jordan Method: 2x + 4y + 6z = 22,3x + 8y + 5z
= 27,-x + y + 2z = 2
mat={{2,4,6,22},{3,8,5,27},{-1,1,2,2}}
Qus3.Find the inverse of the following matrix using Gauss-Jordan Method: A =(1 1 1), (2-3 4),
(3 4 5)
mat1={{1,1,1},{2,-3,4},{3,4,5}}
Find the inverse of the following matrix using Gauss-Jordan Method: A =(012),(123),(311)
mat1={{0,1,2},{1,2,3},{3,1,1}}