Maxima Sheets
Maxima Sheets
Maxima sheets
MATRIX ALGEBRA
Practical no. 4: Introduction to Maxima software(MTC-111)
1. Describe historical evolution of Maxima software.
2. Write the list of preliminary commands in Maxima software with description.
3. Write the list of basic arithmetic operators in Maxima software with description.
4. Perform the following arithmetic operations:
(i) Compute
√ 5·6+9
(ii) Add 5 to the previous output.
(iii) Find a decimal approximation for the previous output.
(iv) Square the previous output.
√
5. Define the expressions A = 5 20 and B = 5, then find decimal approximations
for A + B and A/B.
6. Evaluate the following for a = 12, b = 25 using Maxima.
a) (4a + b) + 3(a − 6b). c) a2 − 7b + 10.
b) (a + b)3 d) a25−1 + b2 +2b+3
a−2
7. If
1 2 −3 2 2
A= 2 5 8 6 10 .
3 4 −5 2 5
then obtain the following.
a) Enter matrix A, then find the order of A using Maxima software.
b) Obtain first, third and fifth row, also second and fourth column of A.
c) Swap row 2 and row 5, then first and third column of A.
d) Add row (2,5,6,8,0) and column (-7,8,3) in A.
e) Perform row operations R2 − 4R1 , R3 + 7R2 and R1 − 8R3 simultaneously
on A.
8. Generate diagonal matrix of order 5 × 5 with diagonal entries {1, −2, 5, 8, 4}.
9. Plot the points [-3, 1] and [2, 5] on a grid for x-range [-10, 10] and
y-range [-10, 10]. Include a label above each point.
10. Plot a black vertical line x = 3, and plot the unit circle in red with
x-range [-4; 4] and y-range [-4; 4]. Include the x and y axes, a grid and a title.
11. Plot the function P (x) = x3 + x2 − 6x and identify its zeros.
a) A + B b)4A c)3A − 2B
d) AT e) A−1 f) (A − 5B)T
g) A · B h) A2 i) A2 − 4A + I2
2. In maxima,
enter the following
matrices.
e 2 3 1 1 −4
A = 0 1 −1 and B =
π 3 0
−2
6 0 3 −3 1 1
Further
x−y+z = 4
2x + y − 3z = 0
x+y+z = 2
3x + 5y − 4z = 0
−3x − 2y + 4z = 0
6x + y − 8z = 0
x+y+z =4
x − y + 2z = 3
2x + 3y − z = 6
x − 2w = −3
2y + 2z = 0
z + 3w = 1
−2x + 3y + 2z + w = 5
1. Find LU factorization
of the matrices
given below.
3 −1 2 −5 3 4
(a) −3 −2 10 (b) 10 −8 −9
9 −5 6 15 1 2
1 3 −5 −3
2 −4 2 −1 −5 8 4
(c) 1 5 −4 (d)
4 2 −5 −7
−6 −2 4
−2 −4 7 5
2. Find echelon form of the following matrices and hence find basis for its column
space.
1 4 8 −3 −7 3 −1 7 3 9
−1 2 7 3 4 −2 2 −2 7 5
(a) A =
−2 2
(b) A =
9 5 5 −5 9 3 3 4
3 6 9 −5 −2 −2 6 6 3 7
3. Find null space Nul A and column space Col A for the following matrices. Also
find rank and nullity and hence verify rank nullity theorem.
4 −7 3 7 5
1 3 4 0
−3 −6 −7 2
6 −8 5 12 −8
(a) A =
(b) −7 10 −8 −9 14
3 3 0 −4
3 −5 4 2 −6
−5 −3 2 9
−5 6 −6 −7 3
4 −2 5 −5
−9 7 −8 0
(c)
−6 4
5 3
5 −3 8 −4
Unit 4: Determinants
1. Compute
the determinants
of the following matrices.
−1 2 3 0 2 5 4 1 1 5 4 1
3 4 3 0 4 7 6 2 0 −2 −4 0
(a)
11 4 6 6 b) 6 −2 −4 0 (c) 3
5 4 1
4 2 4 3 −6 7 7 0 −6 5 5 0
9 1 9 9 9 4 8 8 8 5
9 0 9 9 2 0 1 0 0 0
(d)
4 0 0 5 0 (e) 6 8 8 8 7
9 0 3 9 0 0 8 8 3 0
6 0 0 7 0 0 8 2 0 0
2. Verify that
det(AB) =
det(A). det(B)
for thefollowing matrices.
5 1 −1 1 0 3
(a) A = 1 −3 −2 , B = 4 0 −1
0 5 3 3 8 6
4 0 0 5 1 −2 5 2
1 7 2 −5
B= 0 0 3 0
(b) A = 3 0 0 0 2 −4 −3 5
8 3 1 7 2 0 3 5
3. Compute
the adjoint
of the following
matrices
0 −2 −1 1 1 3 3 5 4
(a) 5 0 0 (b) −2 2 1 (c) 1 0 1
−1 1 1 0 1 1 2 1 1
1 −2 1 2
1 0 −2 a b c
2 3 −1 −5
(d)
4 −1
(e) −3 1 4 (f ) d e f
1 −1
2 −3 4 g h i
5 −3 2 1
1 5 −4
−1 −4 5 .
−2 −8 7
DISCRETE MATHEMATICS
Practical no. 10: Introduction to Maxima software(MTC-112)
10. The Fibonacci sequence is defined by a recursive formula fn = fn−1 + fn−2 ; Use
a do-loop to generate the first twenty terms of the Fibonacci sequence.
11. Make a plot of the sine function on the interval [0; 4π]. Identify the period and
the first three zeros (roots) of the sine function.
12. Plot f (x) = cosx, g(x) = cosx + 1, and h(x) = cosx − 2 on the same graph using
red, blue and black, respectively. Include a key to identify each plot in the graph.
13. Make a quick plot of the paraboloid z = x2 + y 2 using wxplot3d. In addition, use
plot3d to draw the paraboloid in a GNUplot window, then manipulate the plot
with a mouse.
Unit 1: Logic
1. If
p : x2 − 8 = 20
q : y + 17 < 30
then determine the truth values of following statements using Maxima for
{x, y} ∈ Z.
a) p ∨ q, b) (p ∧ q) → p, c) p → q,
d) ¬q ∧ ¬p, e) ¬p → q, f) p ↔ q.
2. If
p : x − 10 = 4
q : y + 4 6= 9
r : z + 9 < 18
then determine the truth values of following statements using Maxima for
{x, y, z} ∈ Z.
a) p ∨ (q ∨ r). b) (p ∧ q) ∧ r. c) p → q(→ r).
d) (¬p ∨ ¬q) ∧ r. e) (¬p → q) ∧ r. f) (p ∨ q) ↔ (q ∧ r).
(a) ¬(p ∨ q) ≡ ¬p ∧ ¬q
(b) ¬(p ∧ q) ≡ ¬p ∨ ¬q
(c) p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
(d) p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
(e) p → (q ∨ r) 6= (p → q) ∧ (p → r)
4. For the expression “x + y < 3”, find the following using Maxima software.
a) {1, 2, 3, 4, 5, 6, 7}, R={(1, 2), (1, 5), (1, 6)(2, 1), (2, 3), (2, 7), (3, 4),
(3, 5), (4, 2), (4, 7), (5, 4), (6, 2), (7, 1), (7, 4)}
2. In each of the following relation, find the digraph of the relation R defined on the
given set A using Maxima.
a) A={1, 2, 3, 4}, R={(1, 2), (2, 1), (1, 4), (4, 1), (2, 3), (3, 2), (3, 4),
(4, 3), (1, 3), (4, 2)}.
b) A={1, 2, 3, 4, 5}, R={(1, 2), (1, 3), (2, 3), (2, 4), (3, 4), (3, 5),
(4, 1), (4, 5), (5, 1), (5, 2)}.
c) A={1, 2, 3, 4, 5, 6}, R={(1, 2), (1, 6), (1, 5), (2, 3), (2, 4), (2, 5), (3, 4)
(3, 5), (4, 5), (5, 6), (6, 2)}.
a) F (x, y) = (x ∧ y) ∨ (x ∨ ȳ).
c) F (x, y) = (x̄ ∨ y) ∧ (x̄ ∨ ȳ) ∨ (x ∧ y).
d) F (x, y, z) = (x̄ ∨ y ∧ z) ∨ (x ∨ ȳ ∧ z).
e) F (x, y, z) = (x̄ ∧ ȳ ∨ z) ∧ (x ∧ ȳ ∧ z) ∨ (x̄ ∨ ȳ ∧ z).
4. Find Disjunctive normal form and Conjunctive normal form for the following
functions
(a) In how many ways can all the cards be arranged from a 52 card deck?
(b) How many different 10 letter “words” (sequence) are there with no repeated
letter, formed from 26 letter alphabet?
2. In how many ways a committee can be formed from 4 men and 6 women with at
least two men and al least twice as many women as men?
4. By using Maxima find the number of ways to select 4 unordered elements from
a set with 6 elements when repetition is allowed.
6. There are 8 men and 7 women. By using Maxima determine the number of ways
of selecting a committee consisting of
10