100% found this document useful (1 vote)
2K views

II Sem B.Sc. (NEP) Mathematics Lab Manual UOM

This document is a lab manual for the second semester BSc Mathematics course at the University of Mysore. It contains 11 chapters on topics in mathematics like number theory, limits, derivatives, integrals, and their practical applications using the FOSS software MAXIMA. Examples and exercises are provided for concepts like greatest common divisor, prime numbers, congruences, and solving linear congruences.

Uploaded by

rakshajain287
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views

II Sem B.Sc. (NEP) Mathematics Lab Manual UOM

This document is a lab manual for the second semester BSc Mathematics course at the University of Mysore. It contains 11 chapters on topics in mathematics like number theory, limits, derivatives, integrals, and their practical applications using the FOSS software MAXIMA. Examples and exercises are provided for concepts like greatest common divisor, prime numbers, congruences, and solving linear congruences.

Uploaded by

rakshajain287
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

UNIVERSITY OF MYSORE

Lab Manual for

II Sem B.Sc. Mathematics Practical (MATDSCP 2.1)

(Under NEP)

Using FOSS (MAXIMA)

(w. e. f. 2021 - 22)


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

CONTENTS

Sl. CHAPTERS Page


No. No.

1 THEORY OF NUMBERS 03

2 LIMITS AND CONTINUITY 09

3 DIFFERENTIABILITY 19

4 ROLLE’S THEOREM 25

5 LAGRANGE’S MEAN VALUE THEOREM 29

6 TAYLOR’S THEOREM AND INDETERMINATE FORMS 34

7 PARTIAL DERIVATIVES 40

8 LINE INTEGRALS 45

9 DOUBLE INTEGRALS 47

10 TRIPLE INTEGRALS 48

University of Mysore Page 2


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

1. THEORY OF NUMBERS

Greatest Common Divisor (GCD):


Let 𝑎 and 𝑏 be any two integers, not both zero. Then the greatest common divisor of 𝑎 and 𝑏 is a positive
integer 𝑑 satisfying
1) 𝑑|𝑎, 𝑑|𝑏.
2) If 𝑐|𝑎 and 𝑐|𝑏 then 𝑐|𝑑.
We denote this by 𝑑 = (𝑎, 𝑏) 𝑜𝑟 𝑑 = gcd(𝑎, 𝑏).
The greatest common divisor of 𝑎 and 𝑏 is unique and also 𝑑 can be expressed as a linear combination of
𝑎 and 𝑏.

General input to find gcd d of a and b and to find s and t such that as + bt:
load("gcdex")$
igcdex(a, b);

Output:
[s, t, d]

1. Find the gcd of a = 21 and b = 35 and also find the integers s and t such that as + bt.

Input:
load("gcdex")$
igcdex(21, 35);

Output:
[2, -1, 7]

Verification
Input:
(21)*(2) + (35)*(-1);

2. Find the gcd of a = 4824 and b = 2072 and also find the integers s and t such that as + bt.

Input:
load("gcdex")$
igcdex(4824, 2072);

Output:
[64, -149, 8]

University of Mysore Page 3


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Exercise:
1. Find the gcd of a = 595 and b = 252 and also find the integers s and t such that as + bt.
2. Find the gcd of a = 2160 and b = 2904 and also find the integers s and t such that as + bt.
3. Find the gcd of a = 72 and b = 468 and also find the integers s and t such that as + bt.
4. Find the gcd of a = 150 and b = 210 and also find the integers s and t such that as + bt.

Least Common Multiple (LCM):


Let 𝑎 and 𝑏 be any two non-zero integers. Then the least common multiple of 𝑎 and 𝑏 is a positive integer
𝑚 satisfying
1) 𝑎|𝑚, 𝑏|𝑚.
2) If 𝑎|𝑐 and 𝑏|𝑐 then 𝑚|𝑐.
We denote this by 𝑚 = [𝑎, 𝑏].
The least common multiple of 𝑎 and 𝑏 is unique and also 𝑑𝑚 = 𝑎𝑏, where 𝑑 = (𝑎, 𝑏).

General input:
load ("functs")
lcm (expr_1, …, expr_n)

1. Find the lcm of 5 and 25.


Input: lcm(5, 25); Output: 25

2. Find the lcm of 5, 7 and 11.


Input: lcm(5, 7, 11); Output: 385

Prime numbers and Composite numbers:


An integer 𝑝 > 1 is called a prime if its only divisors are 1 and 𝑝. An integer which is not a prime is
called composite.

Prime numbers between any two integers:


General input to find primes between a and b:
primes (a, b);

1. Find all the prime numbers between 1 and 20.


Input: primes(1, 20); Output: [2, 3, 5, 7, 11, 13, 17, 19]

University of Mysore Page 4


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

2. Find all the prime numbers between 21 and 50.


Input: primes(21, 50); Output: [23, 29, 31, 37, 41, 43, 47]

Fundamental Theorem of Arithmetic:


Statement: Every integer 𝒏 > 𝟏 can be expressed as a product of primes; this representation is
unique, apart from the order in which the factors occur.

General input:
ifactors(n); (where 𝑛 = 𝑝1 𝑘1 𝑝2 𝑘2 … 𝑝𝑚 𝑘𝑚 )

Output:
[[p1, k1], [p2, k2], . . . , [pm, km]]

1. Express 360 as a product of prime factors.


Input: ifactors(360); Output: [[2, 3], [3, 2], [5, 1]]

2. Express 1024 as a product of prime factors.


Input: ifactors(1024); Output: [[2, 10]]

Sum of all the positive divisors of an integer:


If 𝑛 = 𝑝1 𝑘1 𝑝2 𝑘2 … 𝑝𝑚 𝑘𝑚 then sum of all the positive integral divisors of n is given by
𝑝1 𝑘1 +1 −1 𝑝2 𝑘2 +1 −1 𝑝𝑚 𝑘𝑚 +1 −1
𝜎(𝑛) = ( )( )…( ).
𝑝1 −1 𝑝2 −1 𝑝𝑚 −1

General input:
divsum(n);

1. Find the sum of all the divisors of 10.


Input: divsum(10); Output: 18

2. Find the sum of all the divisors of 360.


Input: divsum(360); Output: 1070

University of Mysore Page 5


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Euler’s phi-function or Euler’s totient function:


For 𝑛 ≥ 1, let 𝜑(𝑛) denote the number of positive integers less than or equal to 𝑛 and relatively prime to
𝑛. 𝜑 is called Euler’s phi-function.

If 𝑛 = 𝑝1 𝑘1 𝑝2 𝑘2 … 𝑝𝑚 𝑘𝑚 then number of positive integers less than or equal to n is given by


1 1 1
𝜑(𝑛) = 𝑛 (1 − ) (1 − 𝑝 ) … (1 − 𝑝 ).
𝑝1 2 𝑚

General input:
totient(n);

1. Find 𝝋(𝟏𝟎).
Input: totient(10); Output: 4

2. Find 𝝋(𝟑𝟔𝟎).
Input: totient(360); Output: 96

Congruences:
Let 𝑛 be a fixed positive integer. Let 𝑎 and 𝑏 be any two integers. We say that “𝑎 is congruent to 𝑏
modulo 𝑛” if 𝑛 divides (𝑎 − 𝑏). Equivalently, “𝑎 is congruent to 𝑏 modulo 𝑛” if there exists an integer 𝑘
such that 𝑎 − 𝑏 = 𝑛𝑘.
We denote this by 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑛) and read as “𝑎 is congruent to 𝑏 modulo 𝑛”. If “𝑎 is not
congruent to 𝑏 modulo 𝑛”, we write 𝑎 ≢ 𝑏 (𝑚𝑜𝑑 𝑛).

Remark: Since 𝑛|(𝑎 − 𝑏) if and only if −𝑛|(𝑎 − 𝑏) so we take 𝑛, a positive integer.

Note: i) If 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑛) and 𝑐 ≡ 𝑑 (𝑚𝑜𝑑 𝑛) then


1) 𝑎 ± 𝑐 ≡ 𝑏 ± 𝑑 (𝑚𝑜𝑑 𝑛).
2) 𝑎𝑐 ≡ 𝑏𝑑 (𝑚𝑜𝑑 𝑛).
3) 𝑎𝑘 ≡ 𝑏 𝑘 (𝑚𝑜𝑑 𝑛), 𝑘 ∈ ℤ+ .
4) 𝑎 + 𝑥 ≡ 𝑏 + 𝑥 (𝑚𝑜𝑑 𝑛), 𝑥 ∈ ℤ.
5) 𝑎𝑥 ≡ 𝑏𝑥 (𝑚𝑜𝑑 𝑛), 𝑥 ∈ ℤ.
6) If 𝑙|𝑛 then 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑙).
𝑛
ii) If 𝑐𝑎 ≡ 𝑐𝑏 (𝑚𝑜𝑑 𝑛) then 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑑), where 𝑑 = (𝑐, 𝑛). Hence if (𝑐, 𝑛) = 1 and 𝑐𝑎 ≡
𝑐𝑏 (𝑚𝑜𝑑 𝑛) then 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑛).

University of Mysore Page 6


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Euler’s Theorem
Statement: If (𝒂, 𝒏) = 𝟏 then 𝒂𝝋(𝒏) ≡ 𝟏 (𝒎𝒐𝒅 𝒏).

Fermat’s Little Theorem


Statement: If 𝒑 is a prime number and 𝒑 ∤ 𝒂 then 𝒂𝒑−𝟏 ≡ 𝟏 (𝒎𝒐𝒅 𝒑).

Wilson’s Theorem
Statement: If 𝒑 is a prime number then (𝒑 − 𝟏)! ≡ −𝟏 (𝒎𝒐𝒅 𝒑).

Finding the remainder when a is divided by b:


General input:
mod(a, b);

1. Find the remainder when 𝟑𝟒 is divided by 5.


Input: mod(3^4, 5); Output: 1

2. Find the remainder when 𝟏! + 𝟐! + 𝟑! + 𝟒! + 𝟓! + 𝟔! + 𝟕! + 𝟖! + 𝟗! + 𝟏𝟎! is divided by 12.


Input: mod((1! + 2! + 3! + 4! + 5! + 6! + 7! + 8! + 9! + 10!), 12); Output: 9

3. Find the remainder when 𝟏𝟖! is divided by 437.


Input: mod(18!, 437); Output: 436

4. Find the last digit in 𝟏𝟕𝟓𝟒𝟑 .


Input: mod(17^(543), 10); Output: 3

Linear Congruence:

An equation of the form 𝑎𝑥 ≡ 𝑏 (𝑚𝑜𝑑 𝑛), where 𝑎, 𝑏, 𝑐 ∈ ℤ is called a linear congruence or a


congruence of degree 1.

If 𝑎𝑥0 ≡ 𝑏 (𝑚𝑜𝑑 𝑛), 𝑥0 ∈ ℤ, we call 𝑥0 a solution of the congruence 𝑎𝑥 ≡ 𝑏 (𝑚𝑜𝑑 𝑛).

University of Mysore Page 7


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Note:

1) If (𝑎, 𝑛) = 1, then the congruence 𝑎𝑥 ≡ 𝑏 (𝑚𝑜𝑑 𝑛) has a unique solution 𝑥0 . All the other
solutions are given by 𝑥0 + 𝑡𝑛, where 𝑡 ∈ ℤ.
2) If (𝑎, 𝑛) = 𝑑, then the congruence 𝑎𝑥 ≡ 𝑏 (𝑚𝑜𝑑 𝑛) has a solution if and only if 𝑑|𝑏. If 𝑑|𝑏, then
the congruence has 𝑑 mutually incongruent solutions 𝑚𝑜𝑑 𝑛.

Simultaneous Congruence:
Solve 𝒙 ≡ 𝒂(𝒎𝒐𝒅 𝒎𝟏 ), 𝒙 ≡ 𝒃(𝒎𝒐𝒅 𝒎𝟐 ) and 𝒙 ≡ 𝒄(𝒎𝒐𝒅 𝒎𝟑 ).
General input: chinese([𝑎, 𝑏, 𝑐], [𝑚1 , 𝑚2 , 𝑚3 ]) + lcm(𝑚1 , 𝑚2 , 𝑚3 ) ∗ 𝑡; (where t is any integer).

1. Solve 𝒙 ≡ 𝟓(𝒎𝒐𝒅 𝟕) and 𝒙 ≡ 𝟏(𝒎𝒐𝒅 𝟒).


Input: chinese([5, 1], [7, 4]) + lcm(7, 4)*t; Output: 28t + 5

2. Solve 𝒙 ≡ 𝟐(𝒎𝒐𝒅 𝟑), 𝒙 ≡ 𝟑(𝒎𝒐𝒅 𝟒) and 𝒙 ≡ 𝟏(𝒎𝒐𝒅 𝟓).


Input: chinese([2, 3, 1], [3, 4, 5]) + lcm(3, 4, 5)*t; Output: 60t + 11

Exercise:
1. Find the lcm of 19 and 23.
2. Find the lcm of 150 and 210.
3. Find prime numbers between 50 to 100.
4. Find prime numbers between 101 to 200.
5. Express 1040 as a product of prime factors.
6. Express 7400 as a product of prime factors.
7. Find the sum of all the divisors of 25.
8. Find the sum of all the divisors of 123.
9. Find 𝜑(1040), 𝜑(530), 𝜑(23), 𝜑(7400).
10. Find the remainder when 350 × 2100 is divided by 7.
11. Find the remainder when 15! is divided by 17.
12. Find the last digit of 3150 .
13. Solve 𝑥 ≡ 2(𝑚𝑜𝑑 3) and 𝑥 ≡ 3(𝑚𝑜𝑑 5).
14. Solve 𝑥 ≡ 0(𝑚𝑜𝑑 3), 𝑥 ≡ 1(𝑚𝑜𝑑 4) and 𝑥 ≡ 5(𝑚𝑜𝑑 7).
15. Solve 𝑥 ≡ 1(𝑚𝑜𝑑 3), 𝑥 ≡ 2(𝑚𝑜𝑑 4) and 𝑥 ≡ 3(𝑚𝑜𝑑 5).

University of Mysore Page 8


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

2. LIMITS AND CONTINUITY


Limit of a function:
A function 𝑓(𝑥) is said to tend to a limit 𝑙 as 𝑥 tends to 𝑎 if for every ɛ > 0, however small, there exists
a corresponding positive real number 𝛿, such that
|𝑓 (𝑥) − 𝑙| < ɛ, whenever 0 < |𝑥 − 𝑎| < 𝛿
It is denoted by
lim 𝑓(𝑥) = 𝑙
𝑥→𝑎
Geometrically, the distance between 𝑓(𝑥) and 𝑙 can be made as small, by choosing 𝑥 sufficiently
close to 𝑎.

Left hand Limit


A function 𝑓(𝑥) is said to tend to a limit 𝑙 as 𝑥 tends to 𝑎 through the values less than 𝑎 if for
every ɛ > 0, however small, there exists a corresponding positive real number 𝛿, such that ǀ 𝑓 (𝑥) −
𝑙ǀ < ɛ, whenever 𝑎 − 𝛿 < 𝑥 < 𝑎
It is denoted by
lim− 𝑓(𝑥) = 𝑙
𝑥→𝑎
and is called the Left hand limit (LHL).

Right hand Limit


A function 𝑓(𝑥) is said to tend to a limit 𝑙 as 𝑥 tends to 𝑎 through the values greater than 𝑎 if for
every ɛ > 0, however small, there exists a corresponding positive real number 𝛿, such that ǀ 𝑓 (𝑥) −
𝑙ǀ < ɛ, whenever 𝑎 < 𝑥 < 𝑎 + 𝛿
It is denoted by
lim+ 𝑓(𝑥) = 𝑙
𝑥→𝑎
and is called the Right hand limit (RHL).

Remarks
The limit of a function 𝑓(𝑥) is said to be 𝑙 as 𝑥 tends to 𝑎 if and only if both left hand limit and
right hand limit exists and they are equal.
i.e
(i) lim− 𝑓(𝑥) and lim+ 𝑓(𝑥) exist
𝑥→𝑎 𝑥→𝑎
(ii) lim− 𝑓(𝑥) = lim+ 𝑓(𝑥) = 𝑙
𝑥→𝑎 𝑥→𝑎
then we write
lim 𝑓(𝑥) = 𝑙
𝑥→𝑎

University of Mysore Page 9


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Working rule
To find lim 𝑓(𝑥) if it exists
𝑥→𝑎
Step 1: Find LHL , lim− 𝑓(𝑥) = lim 𝑓(𝑎 − ℎ), where ℎ > 0
𝑥→𝑎 ℎ→0
Step 2: Find RHL, lim+ 𝑓(𝑥) = lim 𝑓(𝑎 + ℎ), where ℎ > 0
𝑥→𝑎 ℎ→0
Step 3: If lim− 𝑓(𝑥) = lim+ 𝑓(𝑥) = 𝑙 then we say that lim 𝑓(𝑥) exists and is equal to the common value
𝑥→𝑎 𝑥→𝑎 𝑥→𝑎
of LHL and RHL which is 𝑙.
If lim− 𝑓(𝑥) ≠ lim+ 𝑓(𝑥) then we say that lim 𝑓(𝑥) does not exists.
𝑥→𝑎 𝑥→𝑎 𝑥→𝑎
If lim− 𝑓(𝑥) or lim+ 𝑓(𝑥) does not exists then also we say that lim 𝑓(𝑥) does not exists.
𝑥→𝑎 𝑥→𝑎 𝑥→𝑎

1. Find the limit of the following function f(x) at x = 1 if it exists


𝒙𝟐 + 𝟑 𝒙≤𝟏
𝒇(𝒙) = { . Also plot f(x) in the interval [-5, 5].
𝒙+𝟏 𝒙>𝟏
Input:
kill(all)$
a:1$
f1(x):=x^2+3$
f2(x):=x+1$
'LHL=LHL:limit(f1(x),x,a,minus);
'RHL=RHL:limit(f2(x),x,a,plus);
if LHL=RHL and LHL<inf and LHL#ind then
Print("Limit exists at","x=",a)
else
print("Limit doesn't exists at","x=",a)$

Output:
LHL=4
RHL=2
Limit doesn't exists at x = 1

Input:
load(draw)$
wxdraw2d(xrange=[-5, 5],yrange=[-2, 10],
explicit(f1(x), x, -5, 1),
explicit(f2(x), x, 1, 5))$

University of Mysore Page 10


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

|𝒙−𝟐|
2. Evaluate 𝐥𝐢𝐦 if it exists. Also plot the graph in the interval [-8, 12].
𝒙→𝟐 𝒙−𝟐
Input:
kill(all)$
a: 2$
f(x):= abs(x-2)/(x-2)$
'LHL = LHL: limit(f(x), x, a, minus);
'RHL = RHL: limit(f(x), x, a, plus);
if LHL = RHL and LHL< inf and LHL#ind then
Print("Limit exists at","x=",a)
else
print("Limit doesn't exists at","x=",a)$

Output:
LHL = -1
RHL = 1
Limit doesn't exists at x = 2

Input:
load(draw)$
wxdraw2d(xrange = [-8, 12], yrange = [-2, 2],
explicit(f(x), x, -8, 2),
explicit(f(x), x, 2, 12))$

3. If [𝒙] denotes the greatest integer not greater than x, then evaluate 𝐥𝐢𝐦[𝒙] if it exists.
𝒙→𝟏

Also plot the graph in the interval [-4, 4].


Input:
kill(all)$
a: 1$
f(x):= floor(x)$
'LHL= LHL: limit(f(x), x, a, minus);
'RHL= RHL: limit(f(x), x, a, plus);
if LHL = RHL and LHL< inf and LHL#ind then
Print("Limit exists at","x=",a)
else
print("Limit doesn't exists at","x=",a)$

University of Mysore Page 11


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Output:
LHL= 0
RHL= 1
Limit doesn't exists at x = 1

Input:
load(draw)$
wxdraw2d(xrange = [-4, 4], yrange = [-4, 4],
explicit(-4, x, -4, -3),
explicit(-3, x, -3, -2),
explicit(-2, x, -2, -1),
explicit(-1, x, -1, 0),
explicit(0, x, 0, 1),
explicit(1, x, 1, 2),
explicit(2, x, 2, 3),
explicit(3, x, 3, 4),
point_size = 1.5,
point_type = circle,
points([1, 1], [0, 0]),
point_type = filled_circle,
points([1, 1], [1, 1]))$

Exercise:
𝑒 1/𝑥
1. Evaluate lim if it exists. Also plot the graph.
𝑥→0 𝑒 1/𝑥 +1
𝑥
2. Evaluate lim if it exists. Also plot the graph in the interval [-4, 4].
𝑥→0 |𝑥|
3. Find the limit of the following function f(x) at x = 1 if it exists
3𝑥 − 2 𝑥<1
𝑓(𝑥) = { . Also plot f(x) in the interval [-5, 5].
4𝑥 2 − 3𝑥 𝑥>1
4. Find the limit of the following function f(x) at x = 1/3 if it exists
𝑥2 + 𝑥 𝑥 < 1/3
𝑓(𝑥) = { 5 𝑥 = 1/3 . Also plot f(x) in the interval [-3, 3].
12𝑥 3 𝑥 > 1/3

University of Mysore Page 12


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Continuity:
A function 𝑓(𝑥) is said to be continuous at 𝑥 equal to 𝑎 if for every ɛ > 0, however small, there
exists a corresponding positive real number 𝛿, such that ǀ 𝑓 (𝑥) − 𝑓(𝑎)ǀ < ɛ, whenever ǀ 𝑥 − 𝑎 ǀ < 𝛿
In other words A function 𝑓(𝑥) is said to be continuous at 𝑥 equal to 𝑎 if lim 𝑓(𝑥) exists and is
𝑥→𝑎
equal to 𝑓(𝑎)
If a function 𝑓(𝑥) is not continuous at 𝑥 = 𝑎, then we say that 𝑓(𝑥) is discontinuous at 𝑥 = 𝑎.

Remarks
1. A function 𝑓(𝑥) is said to be continuous at 𝑥 = 𝑎 if and only if
(i) 𝑓(𝑎) is defined
(ii) lim− 𝑓(𝑥) and lim+ 𝑓(𝑥) exist
𝑥→𝑎 𝑥→𝑎
(iii) lim− 𝑓(𝑥) = lim+ 𝑓(𝑥) = 𝑓(𝑎)
𝑥→𝑎 𝑥→𝑎
2. A function 𝑓(𝑥) is said to be continuous on an interval [𝑎, 𝑏] if 𝑓(𝑥) is continuous at every point of
[𝑎, 𝑏].
3. If a function 𝑓(𝑥) is not continuous at 𝑥 = 𝑎, then we say that 𝑎 is a point of discontinuity.

Working Rule
To check whether 𝑓(𝑥) is continuous at 𝑥 = 𝑎 or not
Step 1: Find LHL, lim− 𝑓(𝑥) = lim 𝑓(𝑎 − ℎ), where ℎ > 0
𝑥→𝑎 ℎ→0
Step 2: Find RHL, lim+ 𝑓(𝑥) = lim 𝑓(𝑎 + ℎ), where ℎ > 0
𝑥→𝑎 ℎ→0
Step 3: If lim− 𝑓(𝑥) = lim+ 𝑓(𝑥) = 𝑓(𝑎) then we say that 𝑓(𝑥) is continuous at 𝑥 = 𝑎
𝑥→𝑎 𝑥→𝑎
Otherwise we say that 𝑓(𝑥) is discontinuous at 𝑥 = 𝑎

Types of Discontinuity
Discontinuity of First kind: We say that 𝑓(𝑥) is has a discontinuity of First kind at 𝑥 = 𝑎 if lim− 𝑓(𝑥)
𝑥→𝑎
and lim+ 𝑓(𝑥) exists but either lim− 𝑓(𝑥) ≠ lim+ 𝑓(𝑥) or lim− 𝑓(𝑥) = lim+ 𝑓(𝑥) ≠ 𝑓(𝑎).
𝑥→𝑎 𝑥→𝑎 𝑥→𝑎 𝑥→𝑎 𝑥→𝑎

Discontinuity of Second kind: We say that 𝑓(𝑥) is has a discontinuity of Second kind at 𝑥 = 𝑎 if
lim− 𝑓(𝑥) or lim+ 𝑓(𝑥) does not exists.
𝑥→𝑎 𝑥→𝑎

University of Mysore Page 13


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

1. Discussing the continuity of the following function f(x) at x = -2


𝟑 − 𝒙𝟐 𝒙 < −2
𝒇(𝒙) = {𝟎 𝒙 = −𝟐. Also plot f(x) in the interval [-4, 4].
𝟏𝟏 − 𝒙𝟐 𝒙 > −𝟐
Input:
kill(all)$
a:-2$
f1(x):= 3-x^2$
f2(x):= 11-x^2$
'f(a)=fa:0;
'LHL=LHL:limit(f1(x),x,a,minus);
'RHL=RHL:limit(f2(x),x,a,plus);
if LHL=RHL and LHL=fa and LHL<inf and LHL#ind then
Print("Given function is continuous at","x=",a)
else
print("Given function is not continuous at","x=",a)$

Output:
f(-2)= 0
LHL= -1
RHL= 7
Given function is not continuous at x= -2

Input:
load(draw)$
wxdraw2d(xrange=[-4, 4], yrange=[-15, 15],
explicit(f1(x), x, -4, -2),
explicit(fa, x, -2, -2),
explicit(f2(x), x, -2, 4),
point_size=1.5,
point_type=filled_circle,
points([-2,-2], [0,0]))$

University of Mysore Page 14


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

𝐱 𝟐 −𝟗
𝐱≠𝟑
2. Discussing the continuity of the function 𝐟(𝐱) = { 𝐱−𝟑 at x = 3. Also plot f(x) in the
𝟔 𝐱=3
interval [1, 5].

Input:
kill(all)$
a: 3$
f(x):=(x^2-9)/(x-3);
'f(x)=h: ratsimp(f(x));
'f(a)=fa: 6;
'LHL=LHL: limit(h, x, a, minus);
'RHL=RHL:limit(h, x, a, plus);
if LHL=RHL and LHL=fa and LHL#inf and LHL#ind then
print("Given function is continuous at","x=",a)
else
print("Given function is not continuous at","x=",a)$

Output:
𝑥 2 −9
f(x):= 𝑥−3
f(x)= x+3
f(3)= 6
LHL= 6
RHL= 6
Given function is continuous at x = 3

Input:
load(draw)$
wxdraw2d(xrange = [1,5], yrange = [4,8],
explicit(f(x), x, 1, 3),
explicit(fa, x, 3, 3),
explicit(f(x), x, 3, 8),
point_size= 1.5,
point_type= filled_circle,
points([3, 3], [6, 6]))$

University of Mysore Page 15


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

3. Discuss the continuity of the following function f(x) at x = 2


𝐞𝟏/(𝐱−𝟐) 𝐱 ≠ 𝟐
𝐟(𝐱) = { . Also plot f(x) in the interval [-5, 5].
𝟎 𝐱=2
Input:
kill(all)$
a: 2$
f(x):= %e^(1/(x-2));
'f(a)=fa: 0;
'LHL=LHL: limit(f(x),x,a,minus);
'RHL=RHL: limit(f(x),x,a,plus);
if LHL=RHL and LHL=fa and LHL#inf and LHL#ind then
print("Given function is continuous at","x=",a)
else
print("Given function is not continuous at","x=",a)$

Output:
1
f(x):= 𝑒 𝑥−2
f(2)= 0
LHL= 0
RHL= inf
Given function is not continuous at x = 2

Input:
load(draw)$
wxdraw2d(xrange = [-5, 5], yrange = [-20, 20],
explicit(f(x), x, -5, 2),
explicit(fa, x, 0, 0),
explicit(f(x), x, 2, 5),
point_size=1.5,
point_type=filled_circle,
points([2, 2], [0, 0]))$

University of Mysore Page 16


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

4. Discuss the continuity of the following function f(x) at x = 0


𝟏
𝐬𝐢𝐧 (𝐱) 𝐱 ≠ 𝟎
𝐟(𝐱) = { . Also plot f(x) in the interval [-1, 1].
𝟎 𝐱=0

Input:
kill(all)$
a: 0$
'f(a)=fa: 0;
'LHL=LHL: limit(sin(1/x),x,a,minus);
'RHL=RHL: limit(sin(1/x),x,a,plus);
if LHL=RHL and LHL=fa and LHL<inf and LHL#ind then
print("Given function is continuous at","x=",a)
else
print("Given function is not continuous at","x=",a)$

Output:
f(0)= 0
LHL= ind
RHL= ind
Given function is not continuous at x = 0

Input:
load(draw)$
wxdraw2d(xrange=[-1, 1], yrange= [-2, 2],
explicit(sin(1/x), x, -1, 0),
explicit(fa, x, 0, 0),
explicit(sin(1/x), x, 0, 1),
point_size=1.5,
point_type=filled_circle,
points([0, 0], [0, 0]))$

University of Mysore Page 17


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Exercise:
1. Discuss the continuity of the following function f(x) at x = 0
1
𝑓(𝑥) = { 𝑥 sin (𝑥) 𝑥 ≠ 0. Also plot f(x) in the interval [-2, 2].
0 𝑥=0
2. Discuss the continuity of the following function f(x) at x = 0
sin(3x)
𝑥≠0
𝑥
𝑓(𝑥) = { . Also plot f(x) in the interval [-4, 4].
3 𝑥=0
3. Discuss the continuity of the following function f(x) at x = 1
𝑥2 + 2 𝑥<1
𝑓(𝑥) = { 2𝑥 + 1 𝑥 = 1 . Also plot f(x) in the interval [-3, 3].
3 𝑥>1
4. Discuss the continuity of the following function f(x) at x = 1
𝑥2 − 1 𝑥<1
𝑓(𝑥) = { 0 𝑥 = 1 . Also plot f(x) in the interval [-5, 5].
1
1−𝑥 𝑥>1

5. Discuss the continuity of the following function f(x) at x = 0


𝑒 1/𝑥 − 1
𝑓(𝑥) = . Also plot f(x) in the interval [-5, 5].
𝑒 1/𝑥 + 1

University of Mysore Page 18


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

3. DIFFERENTIABILITY
Derivative at a point
Let 𝑓(𝑥) be a function defined on a domain 𝐷 ⊂ ℝ and 𝑎 be any point in the domain. Then
𝑓(𝑥) − 𝑓(𝑎)
lim
𝑥→𝑎 𝑥−𝑎
if exists is called the derivative of 𝑓(𝑥) at 𝑥 = 𝑎 denoted by 𝑓′(𝑎).
If 𝑓 ′ (𝑎) exists, then we say that 𝑓(𝑥) is differentiable at 𝑥 = 𝑎 or 𝑓(𝑥) is derivable at 𝑥 = 𝑎.
Otherwise we say that 𝑓(𝑥) is not differentiable at 𝑥 = 𝑎 or 𝑓(𝑥) is not derivable at 𝑥 = 𝑎.
If 𝑓(𝑥) is defined on [𝑎, 𝑏], we say that 𝑓(𝑥) is differentiable in [𝑎, 𝑏] if and only if 𝑓(𝑥) is
differentiable at every point of [𝑎, 𝑏].

Left Hand Derivative and Right Hand Derivative


Let 𝑓(𝑥) be a function defined on a domain 𝐷 ⊂ ℝ and 𝑎 be any point in the domain. Then
𝑓(𝑥)−𝑓(𝑎)
lim− if exists is called the Left hand derivative of 𝑓(𝑥) at 𝑥 = 𝑎 and is denoted by
𝑥→𝑎 𝑥−𝑎
𝐿𝑓′(𝑎) or LHD.
𝑓(𝑥)−𝑓(𝑎)
And lim+ if exists is called the Right hand derivative of 𝑓(𝑥) at 𝑥 = 𝑎 and is denoted by
𝑥→𝑎 𝑥−𝑎
𝑅𝑓′(𝑎) or RHD.
It is obvious that 𝑓 ′ (𝑎) exists if and only if 𝐿𝑓′(𝑎) and 𝑅𝑓′(𝑎) both exists and are equal.

Working rule
To find out 𝑓 ′ (𝑎) or To check whether 𝑓(𝑥) is differentiable at 𝑥 = 𝑎 or not.
Step 1: Find LHD,
𝑓(𝑥)−𝑓(𝑎) 𝑓(𝑎−ℎ)−𝑓(𝑎) 𝑓(𝑎−ℎ)−𝑓(𝑎)
𝐿𝑓 ′ (𝑎) = lim− = lim = lim
𝑥→𝑎 𝑥−𝑎 ℎ→0 (𝑎−ℎ)−𝑎 ℎ→0 −ℎ
Step 2: Find RHD,
𝑓(𝑥)−𝑓(𝑎) 𝑓(𝑎+ℎ)−𝑓(𝑎) 𝑓(𝑎+ℎ)−𝑓(𝑎)
𝑅𝑓 ′ (𝑎) = lim+ = lim = lim
𝑥→𝑎 𝑥−𝑎 ℎ→0 (𝑎+ℎ)−𝑎 ℎ→0 ℎ
Step 3: If both 𝐿𝑓′(𝑎) and 𝑅𝑓′(𝑎) exists and are equal, then 𝑓(𝑥) is differentiable at 𝑥 = 𝑎.
And 𝐿𝑓 ′ (𝑎) = 𝑅𝑓 ′ (𝑎) = 𝑓′(𝑎)

If either 𝐿𝑓′(𝑎) or 𝑅𝑓′(𝑎) does not exists Or both 𝐿𝑓′(𝑎) and 𝑅𝑓′(𝑎) exists and are not equal to
each other, then 𝑓(𝑥) is not differentiable at 𝑥 = 𝑎.

University of Mysore Page 19


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

𝝅
1. Discuss the differentiability of the following function at x = 𝟐
𝝅
𝟏 + 𝒔𝒊𝒏(𝒙) 𝟎< 𝑥< 𝟐
𝒇(𝒙) = { . Also plot f(x) in the interval [0, 𝝅].
𝝅 𝟐 𝝅
𝟐 + (𝒙 − 𝟐 ) 𝒙≥ 𝟐

Input:
kill(all)$
a:%pi/2$
f1(x):=1+sin(x)$
f2(x):=2+(x-%pi/2)^2$
'f(a)=fa:ev(f2(x),x:a);
'LHD=LHD:limit((f1(x)-fa)/(x-a), x, a, minus);
'RHD=RHD:limit((f2(x)-fa)/(x-a), x, a, plus);
if LHD=RHD and RHD#inf and RHD#ind then
print("Given function is differentiable","x=",a)
else
print("Given function is not differentiable","x=",a)$

Output:
𝜋
f(2 ) = 2
LHD = 0
RHD = 0
𝜋
Given function is differentiable x = 2

Input:
load(draw)$
wxdraw2d(xrange= [0, %pi], yrange= [0, 5],
explicit(f1(x), x, 0, %pi/2),
explicit(fa, x, %pi/2, %pi/2),
explicit(f2(x), x, %pi/2, %pi),
point_size=1.5,
point_type=filled_circle,
points([%pi/2, %pi/2], [2, 2]))$

University of Mysore Page 20


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

2. Discuss the differentiability of the function f(x) = |𝒙| at x = 0. Also plot f(x) in the interval [-1, 1].

Input:
kill(all)$
a:0$
f(x):= abs(x)$
'f(a)= fa:ev(f(x), x:a);
'LHD=LHD:limit((f(x)-fa)/(x-a), x, a, minus);
'RHD=RHD:limit((f(x)-fa)/(x-a), x, a, plus);
if LHD=RHD and RHD#inf and RHD#ind then
print("Given function is differentiable ","x=",a)
else
print("Given function is not differentiable ","x=",a)$
wxplot2d(f(x), [x, -1, 1], [y, -1, 1]);

Output:
f(0) = 0
LHD = -1
RHD = 1
Given function is not differentiable x = 0

University of Mysore Page 21


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

3. Discuss the differentiability of the following function at x = 0


𝟏
𝒙𝟐 𝒔𝒊𝒏 (𝒙) 𝒙≠𝟎 𝝅 𝝅
𝒇(𝒙) = { . Also plot f(x) in the interval [− 𝟑𝟐 , ].
𝟑𝟐
𝟎 𝒙=𝟎

Input:
kill(all)$
a: 0$
f(x):= x^2*sin(1/x);
'f(a)=fa: 0;
'LHD=LHD: limit((f(x)-fa)/(x-a), x, a, minus);
'RHD=RHD: limit((f(x)-fa)/(x-a), x, a, plus);
if LHD=RHD and RHD#inf and RHD#ind then
print("Given function is differentiable at",a)
else
print("Given function is not differentiable at",a)$
wxplot2d(f(x), [x, -%pi/32, %pi/32]);

Output:
1
f(x):= 𝑥 2 𝑠𝑖𝑛 (𝑥)
f(0)= 0
LHD= 0
RHD= 0
Given function is differentiable at x = 0

University of Mysore Page 22


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

4. Discuss the differentiability of the following function at x = 1


𝟏−𝒙 𝒙<1
𝒇(𝒙) = { . Also plot f(x) in the interval [-3, 5].
𝟐
𝒙 −𝟏 𝒙≥𝟏
Input:
kill(all)$
a:1$
f1(x):=1-x$
f2(x):=x^2-1$
'f(a)=fa:ev(f2(x),x:a);
'LHD=LHD:limit((f1(x)-fa)/(x-a), x, a, minus);
'RHD=RHD:limit((f2(x)-fa)/(x-a), x, a, plus);
if LHD=RHD and RHD#inf and RHD#ind then
print("Given function is differentiable","x=",a)
else
print("Given function is not differentiable","x=",a)$

Output:
f(1)= 0
LHD= -1
RHD= 2
Given function is not differentiable x = 1

Input:
load(draw)$
wxdraw2d(xrange= [-3, 5], yrange= [0, 5],
explicit(f1(x), x, -3, 1),
explicit(fa, x, 1, 1),
explicit(f2(x), x, 1, 5),
point_size= 1.5,
point_type= filled_circle,
points([1, 1], [0, 0]))$

University of Mysore Page 23


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Exercise:
1. Discuss the differentiability of the following function f(x) at x = 3
𝑥2 𝑥≤3
𝑓(𝑥) = { . Also plot f(x) in the interval [0, 6].
6𝑥 − 9 𝑥>3
2. Discuss the differentiability of the following function f(x) at x = 1
1 + 2𝑥 − 1 ≤ 𝑥 ≤ 0
𝑓(𝑥) = { 1 − 3𝑥 0 < 𝑥 ≤ 1 . Also plot f(x) in the interval [-3, 3].
𝑥−3 1<𝑥≤2
3. Discuss the differentiability of the following function f(x) at x = 2
𝑥2 𝑥<2
𝑓(𝑥) = { . Also plot f(x) in the interval [-5, 5].
6𝑥 − 2 𝑥≥2
4. Discuss the differentiability of the function f(x) = |𝑥 − 3| at x = 3. Also plot f(x) in the
interval [0, 6].

University of Mysore Page 24


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

4. ROLLE’S THEOREM

Statement: If a function 𝒇(𝒙) defined on [𝒂, 𝒃] 𝐢𝐬


i) continuous at every point of the [𝒂, 𝒃]
ii) differentiable at every point of the (𝒂, 𝒃)
iii) 𝒇(𝒂) = 𝒇(𝒃)
then there exists at least one 𝒄 ∈ (𝒂, 𝒃) such that 𝒇′ (𝒄) = 𝟎.

Geometrical interpretation of Rolle’s theorem


Fig 1 shows the graph of a differentiable curve for which there is a horizontal line that crosses
the curve at two points (𝑎, 𝑓(𝑎)) and (𝑏, 𝑓(𝑏)) . Then there is a point (𝑐, 𝑓(𝑐)) on the curve where
the tangent is horizontal ( i.e., the tangent is parallel to the x-axis) and correspondingly slope of the
tangent at that point is 𝑓 ′ (𝑐) = 0.

In Figure 2 also there is a horizontal line that crosses the curve at two points. For this curve it can be seen
that there are three points (𝑐1 , 𝑓(𝑐1 )), (𝑐2 , 𝑓(𝑐2 )) and (𝑐3 , 𝑓(𝑐3 )) such that tangents at these points are
horizontal so that 𝑓 ′ (𝑐1 ) = 0 , 𝑓 ′ (𝑐2 ) = 0 and 𝑓 ′ (𝑐3 ) = 0.

University of Mysore Page 25


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Algebraic interpretation
Let f(x) be a polynomial function with 𝑓(𝑎) = 𝑓(𝑏) = 0, 𝑖. 𝑒. , 𝑎 𝑎𝑛𝑑 𝑏 are roots of the
polynomial 𝑓(𝑥). Being a polynomial , 𝑓(𝑥) is continuous and differentiable at every real number.
Hence in particular 𝑓(𝑥) is continuous on [a,b] and differentiable on (a, b). Thus all the conditions of
Rolle’s theorem are satisfied and hence there is a root c in the open interval ( 𝑎, 𝑏) such that 𝑓 ′ (𝑐) = 0.
That is , there is a root c in the open interval (a,b) for the derivative polynomial 𝑓 ′ (𝑥).

1. Verify Rolle’s theorem for the function f(x) = x3 - 6x2 + 11x – 6 in the interval [1, 3] which is
continuous in [1, 3] and differentiable in (1, 3). Also plot f(x) and 𝐟’(𝐱) in the interval [1, 3].

Input:
kill(all)$
a: 1$
b: 3$
f(x):= x^3-6*x^2+11*x-6;
'f(a) = fa: ev(f(x), x: a);
'f(b) = fb: ev(f(x), x: b);
if fa = fb then
(print("f(a) = f(b)"),
print("All the conditions of Rolle's theorem are satisfied"),
f1(x):= diff(f(x), x, 1),
print("f '(c)=0 implies ", f1(c) = 0),
c: float(solve(f1(c) = 0)),
print("The values of c are:",c),
print("At least one of the c value lie between ",a," and ",b))
else
(print("f(a)#f(b)"),
print("One of the conditions of Rolle's theorem is not satisfied"),
print("Rolle's theorem is not applicable"))$
wxplot2d([f(x), f1(x)], [x, 1, 3]);

Output:
f(x):= x3 - 6x2 + 11x - 6
f(1) = 0
f(3) = 0
f(a) = f(b)
All the conditions of Rolle's theorem are satisfied
f '(c) = 0 implies 3c2 - 12c + 11 = 0
The values of c are: [c = 1.422649730810374, c = 2.577350269189625]
At least one of the c value lie between 1 and 3

University of Mysore Page 26


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

𝒙𝟐 +𝟐
2. Verify Rolle’s theorem for the function f(x) = 𝒍𝒐𝒈 ( ) in the interval [1, 2] which is continuous
𝟑𝒙
in [1, 2] and differentiable in (1, 2). Also plot f(x) and 𝐟’(𝐱) in the interval [1, 2].

Input:
kill(all)$
a: 1$
b: 2$
f(x):= log((x^2+2)/(3*x));
'f(a) = fa: ev(f(x), x: a);
'f(b) = fb: ev(f(x), x: b);
if fa = fb then
(print("f(a) = f(b)"),
print("All the conditions of Rolle's theorem are satisfied"),
f1(x):= diff(f(x), x, 1),
print("f '(c) = 0 implies ", ratsimp(f1(c) = 0)),
c: float(solve(f1(c) = 0)),
print("The values of c are:",c),
print("At least one of the c value lie between ",a," and ",b))
else
(print("f(a)#f(b)"),
print("One of the conditions of Rolle's theorem is not satisfied "),
print("Rolle's theorem is not applicable"))$
wxplot2d([f(x), f1(x)], [x, 1, 2]);

University of Mysore Page 27


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Output:
𝑥 2 +2
f(x):= 𝑙𝑜𝑔 ( )
3𝑥
f(1) = 0
f(2) = 0
f(a) = f(b)
All the conditions of Rolle's theorem are satisfied
𝑐 2 −2
f '(c) = 0 implies =0
𝑐 3 −2𝑐
The values of c are: [c = -1.414213562373095, c = 1.414213562373095]
At least one of the c value lie between 1 and 2

Exercise:
1. Verify Rolle’s theorem for the function f(x) = 𝑥 2 − 6𝑥 + 8 in the interval [2, 4] which is
continuous in [2, 4] and differentiable in (2, 4). Also plot f(x) and f’(x) in the interval [2, 4].
2. Verify Rolle’s theorem for the function f(x) = 𝑥 2 in the interval [1, 2] which is continuous in
[1, 2] and differentiable in (1, 2). Also plot f(x) and f’(x) in the interval [1, 2].
3. Verify Rolle’s theorem for the function f(x) = (𝑥 − 𝑝)4 (𝑥 − 𝑞)6 in the interval [p, q] which is
continuous in [p, q] and differentiable in (p, q).

University of Mysore Page 28


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

5. LAGRANGE’S MEAN VALUE THEOREM


Statement: If a function 𝒇(𝒙) defined on [𝒂, 𝒃] 𝐢𝐬
i) continuous in closed interval [𝒂, 𝒃]
ii) differentiable in open interval (𝒂, 𝒃)
𝒇(𝒃)−𝒇(𝒂)
then there exist at least one 𝒄 ∈ (𝒂, 𝒃) such that 𝒇′(𝒄) = .
𝒃−𝒂

Another form of Lagrange’s Mean Value Theorem

Statement: If a function 𝒇(𝒙)defined on [𝒂, 𝒂 + 𝒉] 𝐢𝐬


i) Continuous in closed interval [𝒂, 𝒂 + 𝒉]
ii) Derivable in open interval (𝒂, 𝒂 + 𝒉)
then there exist at least one 𝜽 ∈ (𝒂, 𝒂 + 𝒉) such that
𝒇(𝒂 + 𝒉) − 𝒇(𝒂)
𝒇′ (𝒂 + 𝜽𝒉) = 𝒊. 𝒆 𝒇(𝒂 + 𝒉) − 𝒇(𝒂) = 𝒉𝒇′(𝒂 + 𝜽𝒉)
𝒉

Geometrical interpretation of Lagrange’s Mean Value Theorem

Geometrically, Lagrange’s Mean Value theorem states that between any two points 𝐴(𝑎, 𝑓(𝑎))
and 𝐵(𝑏, 𝑓(𝑏)) on the graph of the differentiable function (𝑥) , there is a point c such that 𝑎<𝑐<
𝑏 with the property that the tangent at C(𝑐, 𝑓(𝑐)) to the graph of 𝑓(𝑥) is parallel to the chord joining
points A and B.

University of Mysore Page 29


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

In other words , the slope of the tangent at 𝐶(𝑐, 𝑓(𝑐)) and the slope of the chord AB are the same. As
𝑓(𝑏)−𝑓(𝑎)
the slope of the chord AB is and the slope of the tangent at 𝐶(𝑐, 𝑓(𝑐)) is 𝑓 ′ (𝑐) it follows that
𝑏−𝑎
𝑓(𝑏)−𝑓(𝑎)
= 𝑓′(𝑐)
𝑏−𝑎

In the above geometrical interpretation we used the following note

1. Verify Lagrange’s MVT for the function f(x) = 2x2 +3x + 4 in the interval [-1, 1] which is
continuous in [-1, 1] and differentiable in (-1, 1). Also plot f(x), Secant line and Tangent line in the
interval x: [-1, 1], y: [0, 10].

Input:
kill(all)$
a: -1$
b: 1$
f(x):= 2*x^2 + 3*x + 4;
'f(a)= fa: ev(f(x), x: a);
'f(b)= fb: ev(f(x), x: b);
f_prime(x):= ''(diff(f(x), x));
c: float(solve(f_prime(c) = ((f(b) - f(a))/(b-a)), c));
print("At least one of the c values lie between ",a," and ",b)$

Output:
f(x):= 2x2 +3x + 4
f(-1) = 3
f(1) = 9
f_prime(x):= 4x + 3
[c = 0.0]
At least one of the c values lie between -1 and 1

University of Mysore Page 30


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Input:
TANGENT(x, a):= f_prime(a)*(x-a) + f(a)$
SECANT(x, a, b):= ((f(b) - f(a))/(b-a))*(x-a) + f(a)$
wxdraw2d(xrange = [-1, 1], yrange = [0, 10],
color = blue,
explicit((f(x)), x, -5, 5),
color = red,
explicit((TANGENT(x, 0)), x, -1, 1),
color=black,
explicit((SECANT(x, -1, 1)), x, -1, 1));

2. Verify Lagrange’s MVT for the function 𝒇(𝒙) = (𝒙 − 𝟏)(𝒙 − 𝟐)(𝒙 − 𝟑) in the interval [0, 4]
which is continuous in [0, 4] and differentiable in (0, 4). Also plot f(x), Secant line and Tangent line
in the interval x: [-1, 5], y: [-8, 8].

Input:
kill(all)$
a: 0$
b: 4$
f(x):= (x-1)*(x-2)*(x-3);
'f(a) = fa: ev(f(x), x: a);
'f(b) = fb: ev(f(x), x: b);
f_prime(x):= ''(diff(f(x), x));
c: solve(f_prime(c) = ((f(b) - f(a))/(b-a)), c);
print("At least one of the c values lie between ",a," and ",b)$

University of Mysore Page 31


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Output:
f(x) := (x - 1)(x - 2)(x - 3)
f(0) = -6
f(4) = 6
f_prime(x) := (x - 2)(x - 1) + (x - 3)(x - 1) + (x - 3)(x - 2)
(2√3 − 6) (2√3 + 6)
[c = − , c= ]
3 3
At least one of the c values lie between 0 and 4

Input:
TANGENT(x, a) := f_prime(a)*(x-a) + f(a)$
SECANT(x,a,b) := ((f(b) - f(a))/(b-a))*(x-a) + f(a)$
wxdraw2d(xrange = [-1, 5], yrange = [-8, 8],
color = blue,
explicit((f(x)), x, -10, 10),
color = red,
explicit((TANGENT(x, 2 + (2/sqrt(3)))), x, -10, 10),
color = red,
explicit((TANGENT(x, 2 - (2/sqrt(3)))), x, -10, 10),
color = black,
explicit((SECANT(x, 0, 4)), x, 0, 4));

University of Mysore Page 32


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Exercise:
1. Verify Lagrange’s MVT for the function f(x) = ex in the interval [0, 1] which is continuous in
[0, 1] and differentiable in (0, 1). Also plot f(x), Secant line and Tangent line in the interval
x: [-2, 2], y: [0, 5].
2. Verify Lagrange’s MVT for the function f(x) = log(x) in the interval [e, e2] which is continuous in
[e, e2] and differentiable in (e, e2). Also plot f(x), Secant line and Tangent line in the interval
x: [0, 10], y: [0, 3]..
3. Verify Lagrange’s MVT for the function 𝑓(𝑥) = 𝑥 3 + 𝑥 in the interval [1, 2] which is continuous
in [1, 2] and differentiable in (1, 2). Also plot f(x), Secant line and Tangent line in the interval
x: [0, 3], y: [-2, 12].

University of Mysore Page 33


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

6. TAYLOR’S THEOREM AND INDETERMINATE FORMS

TAYLOR’S THEOREM
Statement: Let 𝒇(𝒙) be a function defined [𝒂, 𝒃] such that
(i) 𝒇𝒏−𝟏 (𝒙) is continuous in [𝒂, 𝒃](First (n-1) derivatives are continuous)
(ii) 𝒇𝒏−𝟏 (𝒙) is differentiable in (𝒂, 𝒃)
then there exist one real number 𝒄 ∈ (𝒂, 𝒃) such that
(𝒃−𝒂) (𝒃−𝒂)𝟐 (𝒃−𝒂)𝟑 (𝒃−𝒂)𝒏−𝟏 (𝒃−𝒂)𝒏
𝒇(𝒃) = 𝒇(𝒂) + 𝒇𝟏 (𝒂) + 𝒇𝟐 (𝒂) + 𝒇𝟑 (𝒂) + ⋯ + 𝒇𝒏−𝟏 (𝒂) + 𝒇𝒏 (𝒄).
𝟏! 𝟐! 𝟑! (𝒏−𝟏)! (𝒏)!

Note:
1) Replace ′b′ by ′𝑎 + ℎ′ in (4), then ′𝑐′ can be written as 𝑐 = 𝑎 + 𝜃ℎ, where 𝜃 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 (0,1) and
the theorem becomes,
If 𝑓(𝑥) is function defined on [𝑎, 𝑎 + ℎ], such that
𝑓 𝑛−1 (𝑥) is continuous on [𝑎, 𝑎 + ℎ]
𝑓 𝑛−1 (𝑥) is differentiable on (𝑎, 𝑎 + ℎ)
Then there exist at least one real number 𝜃 ∈ (0,1) such that
ℎ2 ℎ3 ℎ𝑛−1 ℎ𝑛
𝑓(𝑎 + ℎ) = 𝑓(𝑎) + ℎ𝑓 ′ (𝑎) + 𝑓 ′′ (𝑎) + 𝑓 ′′′ (𝑎) + ⋯ + (𝑛−1)! 𝑓 𝑛−1 (𝑎) + 𝑛! 𝑓 𝑛 (𝑎 + 𝜃ℎ) ,
2! 3!

ℎ𝑛
where 𝑓 𝑛 (𝑎 + 𝜃ℎ) is known as Lagrange’s form of remainder after ′𝑛′ terms in the Taylor’s
𝑛!

expansion 𝑓(𝑎 + ℎ).

2) Put 𝑛 = 1 in the Taylor’s theorem we get,


𝑓(𝑏) = 𝑓(𝑎) + (𝑏 − 𝑎)𝑓 ′ (𝑐)
𝑓(𝑏)−𝑓(𝑎)
⟹ 𝑓 ′ (𝑐) = , which is the Lagrange’s Mean value theorem.
𝑏−𝑎

3) Maclaurin’s theorem
Now take 𝑎 = 0, 𝑏 = 𝑥 in the Taylor’s theorem
𝑥2 𝑥3 𝑥 𝑛−1 𝑥𝑛
𝑓(𝑥) = 𝑓(0) + 𝑥𝑓 1 (0) + 𝑓 ′′ (0) + 𝑓 ′′′ (0) ⋯ +(𝑛−1)! 𝑓 𝑛−1 (0) + 𝑛! 𝑓 𝑛 (𝑐)
2! 3!

is known as Maclaurin’s Theorem.

University of Mysore Page 34


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Taylor’s Infinite Series Expansion:

Taylor’s series of 𝑓(𝑥) about the point ′𝑎′ is given by


(𝑥−𝑎)2 (𝑥−𝑎)3 (𝑥−𝑎)𝑛−1
𝑓(𝑥) = 𝑓(𝑎) + (𝑥 − 𝑎)𝑓 1 (𝑎) + 𝑓 ′′ (𝑎) + 𝑓 ′′′ (𝑎) + ⋯ + 𝑓 𝑛−1 (𝑎) + ⋯ ∞
2! 3! (𝑛−1)!

1. Obtain the Taylor’s series expansion of f(x) at x = a.


Input:
kill(all)$
taylor(f(x), x, a, 3);

Output:
1 𝑑3 1 𝑑2 𝑑
( 3
𝑓(𝑥)| ) ( 𝑥 − 𝑎 )3 + ( 𝑓(𝑥)| ) (𝑥 − 𝑎 )2 + ( 𝑓(𝑥)| ) (𝑥 − 𝑎 ) + 𝑓 (𝑎 ) + ⋯
6 𝑑𝑥 𝑥=𝑎 2 𝑑𝑥 2 𝑥=𝑎 𝑑𝑥 𝑥=𝑎

2. Obtain the Taylor’s series expansion of f(x) = ex at x = a.


Input:
kill(all)$
taylor(%e^x, x, a, 5);

Output:
1 1 1 1
𝑒 𝑎 (𝑥 − 𝑎 )5 + 𝑒 𝑎 (𝑥 − 𝑎 )4 + 𝑒 𝑎 ( 𝑥 − 𝑎 )3 + 𝑒 𝑎 (𝑥 − 𝑎 )2 + 𝑒 𝑎 (𝑥 − 𝑎 ) + 𝑒 𝑎 + ⋯
120 24 6 2

3. Obtain the Taylor’s series expansion of f(x) = tan-1(x) at x = 1.


Input:
kill(all)$
taylor(atan(x), x, 1, 5);

Output:
−1 1 −1 1 1
(𝑥 − 1)5 + (𝑥 − 1)3 + (𝑥 − 1 )2 + (𝑥 − 1) + 𝜋 + ⋯
40 12 4 2 4

University of Mysore Page 35


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Maclaurin’s Infinite Series Expansion:


Taylor’s series of 𝑓(𝑥) about the point ′𝑎 = 0′ is given by
𝑥2 𝑥3 𝑥 𝑛−1
𝑓(𝑥) = 𝑓(0) + 𝑥𝑓 ′ (0) + 𝑓 ′′ (0) + 𝑓 ′′′ (0) + ⋯ +(𝑛−1)! 𝑓 𝑛−1 (0) + ⋯ ∞, which is known as
2! 3!
Maclaurin’s series.
or
𝑥 𝑥2 𝑥3 𝑥𝑛
𝑦 = 𝑦(0) + 1! 𝑦1 (0) + 𝑦 (0) + 𝑦 (0) + … … … + 𝑦𝑛 (0) + ⋯ ∞, which is known as
2! 2 3! 3 𝑛!
Maclaurin’s series.

1. Obtain the Maclaurin’s’s series expansion of f(x) = log(1+x) upto the term containing x3.
Input:
kill(all)$
taylor(log(1+x), x, 0, 3);

Output:
1 −1
𝑥3 + 𝑥2 + 𝑥 + ⋯
3 2

2. Obtain the Maclaurin’s’s series expansion of f(x) = log(sec x) upto the term containing x6.
Input:
kill(all)$
taylor(log(sec(x)), x, 0, 6);

Output:
1 6 1 4 1 2
𝑥 + 𝑥 + 𝑥 +⋯
45 12 2

Exercise:
𝜋
1. Obtain the Taylor’s series expansion of f(x) = tan(x) at 𝑥 = 4 .
2. Obtain the Taylor’s series expansion of f(x) = ex at 𝑥 = 1.
3. Obtain the Taylor’s series expansion of f(x) = log(x) at 𝑥 = 1.
4. Obtain the Maclaurin’s series expansion of f(x) = 𝑒 𝑥 cos(x) upto the term containing x4.
5. Obtain the Maclaurin’s series expansion of f(x) = log(1 + cos(x)) upto the term containing x4.
6. Obtain the Maclaurin’s series expansion of f(x) = sin-1(x) upto the term containing x5.
7. Obtain the Maclaurin’s series expansion of f(x) = ex upto the term containing x6.
8. Obtain the Maclaurin’s series expansion of f(x) = sin(x) upto the term containing x6.
9. Obtain the Maclaurin’s series expansion of f(x) = cos(x) upto the term containing x6.
10. Obtain the Maclaurin’s series expansion of f(x) = log(1 + x) upto the term containing x6.

University of Mysore Page 36


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Indeterminate Forms

0 ∞
While evaluating certain limits, we come across expressions of the form 0 , ∞, 0x∞ , ∞ − ∞ ,00 ,
∞0 and 1∞ which do not represent any value. Such expressions are called indeterminate forms.

We can evaluate such limits that lead to indeterminate forms using L’Hospital’s Rule (French
mathematician 1661-1704)

L’Hospital’s Rule
If 𝑓(𝑥) and 𝑔(𝑥) are two functions defined on some interval, satisfies Cauchy’s theorem and such that

i. lim 𝑓(𝑥) = 0 and lim 𝑔(𝑥) = 0


𝑥→𝑎 𝑥→𝑎

ii. 𝑓 ′ (𝑥)and 𝑔′ (𝑥) exists and 𝑔′ (𝑎) ≠ 0


𝑓(𝑥) 𝑓 ′ (𝑥)
Then, lim 𝑔(𝑥) = lim 𝑔′ (𝑥).
𝑥→𝑎 𝑥→𝑎

Note-1: The above rule can be extended i.e.,

if 𝑓 ′ (𝑎) = 0 and 𝑔′(𝑎) = 0 then


𝑓(𝑥) 𝑓 ′ (𝑥) 𝑓 ′′ (𝑥)
lim 𝑔(𝑥) = lim 𝑔′ (𝑥) = lim 𝑔′′ (𝑥)……
𝑥→𝑎 𝑥→𝑎 𝑥→𝑎

0 ∞
Note-2: We apply L’Hospital’s Rule only to evaluate the limits that in or forms. Here we
0 ∞
𝑓 ′ (𝑥)
differentiate the numerator and denominator separately to write and apply the limit to see
𝑔′ (𝑥)
whether it is a finite value.
0 ∞
If it is still in or form we continue to differentiate the numerator and denominator separately to
0 ∞
𝑓 ′′ (𝑥)
write further and apply the limit to see whether it is a finite value. We can continue the above
𝑔′′ (𝑥)
procedure till we get a definite value of the limit.

University of Mysore Page 37


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

General Command:
kill(all)$
limit(function, variable, value);

𝒙−𝒔𝒊𝒏(𝒙)
1. Evaluate 𝐥𝐢𝐦 .
𝒙→𝟎 𝒙𝟑
Input:
kill(all)$
f(x):= x - sin(x)$
g(x):= x^3$
limit(f(x)/g(x), x, 0);

Output:
1
6

2. Evaluate 𝐥𝐢𝐦𝝅 (𝒔𝒆𝒄(𝒙) − 𝒕𝒂𝒏(𝒙)).


𝒙→
𝟐
Input:
kill(all)$
limit(sec(x)-tan(x), x, %pi/2);

Output:
0

𝒕𝒂𝒏(𝒙)
3. Evaluate 𝐥𝐢𝐦
𝝅
( ).
𝒙→ 𝒕𝒂𝒏(𝟑𝒙)
𝟐
Input:
kill(all)$
f(x):= tan(x)$
g(x):= tan(3*x)$
limit(f(x)/g(x), x, 0);

Output:
1
3

University of Mysore Page 38


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

𝟐
4. Evaluate 𝐥𝐢𝐦 (𝒄𝒐𝒔𝒙 )𝟏/𝒙 .
𝒙→𝟎

Input:
kill(all)$
limit(cos(x)^(1/x^2), x, 0);

Output:
1
√e

Exercise:
𝑥 𝑏 −𝑏𝑥
1. Evaluate lim .
𝑥→𝑏 𝑥 𝑥 −𝑏𝑏
𝑒 2𝑥 −(1+𝑥)2
2. Evaluate lim ( ).
𝑥→0 𝑥 𝑙𝑜𝑔(𝑥)

3. Evaluate lim (𝑐𝑜𝑠𝑒𝑐(𝑥) − 𝑐𝑜𝑡(𝑥)).


𝑥→0
1 1
4. Evaluate lim ( − ).
𝑥→0 𝑥2 𝑥 𝑡𝑎𝑛(𝑥)
𝑙𝑜𝑔(𝑠𝑖𝑛𝑥)
5. Evaluate lim ( ).
𝑥→0 𝑐𝑜𝑡(𝑥)
𝜋
𝑙𝑜𝑔(𝑥− )
2
6. Evaluate lim𝜋 ( ).
𝑥→ 𝑡𝑎𝑛(𝑥)
2

7. Evaluate lim (𝑥 𝑙𝑜𝑔(𝑡𝑎𝑛𝑥)).


𝑥→0

1 𝑡𝑎𝑛𝑥
8. Evaluate lim ( ) .
𝑥→0 𝑥

9. Evaluate lim𝜋 ( 𝑠𝑒𝑐𝑥 )𝑐𝑜𝑡𝑥 .


𝑥→
2

10. Evaluate lim𝜋 (𝑡𝑎𝑛𝑥)𝑡𝑎𝑛2𝑥 .


𝑥→
4

11. Evaluate lim (1 + 𝑠𝑖𝑛𝑥 )𝑐𝑜𝑡𝑥 .


𝑥→0

12. Evaluate lim ( 1 − 𝑥 2 )1/𝑙𝑜𝑔(1−𝑥) .


𝑥→0

University of Mysore Page 39


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

7. PARTIAL DERIVATIVES

Homogeneous Functions: A function 𝑓(𝑥, 𝑦) is said to be homogeneous function of 𝑥 and 𝑦 of degree 𝑛


𝑦
if it can be expressed in the form 𝑥 𝑛 𝑓 (𝑥 )

To test whether a function is homogeneous or not, we write 𝑡𝑥 for 𝑥 and 𝑡𝑦 for 𝑦, i.e., 𝑓(𝑡𝑥, 𝑡𝑦) =
𝑡 𝑛 𝑓(𝑥, 𝑦) then the function 𝑓(𝑥, 𝑦) is a homogeneous function of degree 𝑛.

𝑥3 + 𝑦3
Example-1: Let 𝑓(𝑥, 𝑦) = 𝑥+𝑦

𝑡3𝑥3 + 𝑡3𝑦3 𝑡 3 (𝑥 3 + 𝑦 3 )
⇒ 𝑓(𝑡𝑥, 𝑡𝑦) = = = 𝑡 2 𝑓(𝑥, 𝑦)
𝑡𝑥 + 𝑡𝑦 𝑡(𝑥 + 𝑦)

⇒ 𝑓(𝑡𝑥, 𝑡𝑦) = 𝑡 2 𝑓(𝑥, 𝑦)


∴ 𝑓(𝑥, 𝑦) is a homogeneous function of degree 2.

𝑥 3 + 𝑦3
Example-2: Let 𝑓(𝑥, 𝑦) = 𝑐𝑜𝑠 ( )
𝑥− 𝑦

𝑡3𝑥3 + 𝑡3𝑦3 𝑡 3 (𝑥 3 + 𝑦3 ) 𝑡 2 (𝑥 3 + 𝑦3 )
Now 𝑓(𝑡𝑥, 𝑡𝑦) = 𝑐𝑜𝑠 ( ) = 𝑐𝑜𝑠 [ ] = 𝑐𝑜𝑠 [ (𝑥−𝑦)
] ≠ 𝑡 2 𝑓(𝑥, 𝑦)
𝑡𝑥−𝑡 𝑦 𝑡(𝑥−𝑦)

𝑥3 + 𝑦3
∴ 𝑓(𝑥, 𝑦) = 𝑐𝑜𝑠 ( ) is not a homogeneous function.
𝑥− 𝑦

𝑥 4 − 𝑦4
Example-3: Let 𝑓(𝑥, 𝑦) = 𝑥+𝑦
𝑦4 𝑦4
𝑥 4 (1− 4 ) 𝑥 3 (1− 4 )
𝑥 𝑥
Now 𝑓(𝑥, 𝑦) = 𝑦 = 𝑦
𝑥 (1− ) (1− )
𝑥 𝑥

𝑦
⇒ 𝑓(𝑥, 𝑦) = 𝑥 3 𝜑 ( )
𝑥

∴ 𝑓(𝑥, 𝑦) is a homogeneous function of degree 3.

Homogeneous Functions of Three Variables: A function 𝑢 of three variables 𝑥, 𝑦, 𝑧 is said to be


homogeneous of degree 𝑛, if it can expressed as
𝑦 𝑧 𝑥 𝑧 𝑥 𝑦
𝑢 = 𝑥 𝑛 𝑓 (𝑥 , 𝑥) 𝑜𝑟 𝑢 = 𝑦 𝑛 𝑓 (𝑦 , 𝑦) or = 𝑧 𝑛 𝑓 (𝑧 , 𝑧 ) .

University of Mysore Page 40


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Euler’s Theorem for homogeneous functions


Statement:
𝝏𝒖 𝝏𝒖
If 𝒖 = 𝒇(𝒙, 𝒚) is a homogeneous function of degree 𝒏 in 𝒙 and 𝒚 then 𝒙 𝝏𝒙 + 𝒚 𝝏𝒚 = 𝒏𝒖.

Note: Euler’s Theorem can be extended to a homogeneous function of any number of variables. Thus if
𝑓(𝑥1 , 𝑥2 , 𝑥3 , … , 𝑥𝑛 ) be a homogeneous function degree 𝑘 in 𝑛 variables 𝑥1 , 𝑥2 , 𝑥3 , … , 𝑥𝑛
𝜕𝑓 𝜕𝑓 𝜕𝑓 𝜕𝑓
then 𝑥1 𝜕𝑥 + 𝑥2 𝜕𝑥 + 𝑥3 𝜕𝑥 + … + 𝑥𝑛 𝜕𝑥 = 𝑘𝑓.
1 2 3 𝑛

Verification of Euler’s Theorem

1. If 𝒖 = 𝒂𝒙𝟐 + 𝟐𝒉𝒙𝒚 + 𝒃𝒚𝟐 ; verify Euler’s theorem.


Input:
‘u(x, y)= u: a*x^2+2*h*x*y+b*y^2;
'ux= ux : diff(u, x);
'uy= uy: diff(u, y);
euler: x*ux+y*uy;
LHS: ratsimp(euler);
is(LHS = ratsimp(2*u));

Output:
u(x, y) = by2 + 2hxy + ax2
ux = 2hy + 2ax
uy = 2by + 2hx
x(2hy + 2ax) + y(2by + 2hx)
2by2 + 4hxy + 2ax2
true

𝒙𝟑 +𝒚𝟑 𝝏𝒖 𝝏𝒖
2. If 𝒖 = 𝐭𝐚𝐧−𝟏 ( ) ; (𝒙 ≠ 𝒚), show that 𝒙 𝝏𝒙 + 𝒚 𝝏𝒚 = 𝐬𝐢𝐧 𝟐𝒖.
𝒙−𝒚
Input:
kill(all)$
'u(x, y) = u: atan((x^3+y^3)/(x-y));
'ux = ux: diff(u, x, 1);
'uy = uy: diff(u, y, 1);
University of Mysore Page 41
I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

euler: x*ux+y*uy;
'LHS = LHS: ratsimp(euler);
'RHS = RHS: ratsimp(trigexpand(sin(2*u)));
is(LHS=RHS);

Output:
2𝑦 4 −2𝑥𝑦 3 +2𝑥 3 𝑦−2𝑥 4
LHS = −
𝑦 6 +2𝑥 3 𝑦 3 +𝑦 2 −2𝑥𝑦+𝑥 6 +𝑥 2
2𝑦 4 −2𝑥𝑦 3 +2𝑥 3 𝑦−2𝑥 4
RHS = −
𝑦 6 +2𝑥 3 𝑦 3 +𝑦 2 −2𝑥𝑦+𝑥 6 +𝑥 2
true

Exercise:
𝑥
1. If 𝑢 = , verify Euler’s theorem.
𝑥−𝑦
𝑥
2. If 𝑢 = 𝑥𝑦 sin (𝑦) , verify Euler’s theorem.
𝑥 4 +𝑦 4 𝜕𝑢 𝜕𝑢
3. If 𝑢 = 𝑙𝑜𝑔 (
𝑥−𝑦
) ; (𝑥 ≠ 𝑦), show that 𝑥 𝜕𝑥 + 𝑦 𝜕𝑦 = 3.
𝑦 𝜕𝑢 𝜕𝑢
4. If 𝑢 = √𝑥 4 + 𝑦 4 𝑡𝑎𝑛−1 (𝑥 ) , show that 𝑥 𝜕𝑥 + 𝑦 𝜕𝑦 = 2𝑢.
𝑥3 +𝑦3
( ) 𝜕𝑢 𝜕𝑢
5. If 𝑢 = 𝑒 3𝑥+4𝑦 , show that 𝑥 𝜕𝑥 + 𝑦 𝜕𝑦 = 2𝑢 𝑙𝑜𝑔(𝑢).

Jacobian
𝜕𝑢 𝜕𝑢
𝜕𝑥 𝜕𝑦
If 𝑢 and 𝑣 are functions of two independent variables 𝑥 and 𝑦, then the determinant |𝜕𝑣 𝜕𝑣
| is called
𝜕𝑥 𝜕𝑦
𝜕(𝑢,𝑣) 𝑢,𝑣
the Jacobian of 𝑢, 𝑣with respect to 𝑥, 𝑦 and is written as 𝜕(𝑥,𝑦) or 𝐽 (𝑥,𝑦) .
𝜕𝑢 𝜕𝑢 𝜕𝑢
𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕(𝑢,𝑣,𝑤) | 𝜕𝑣 𝜕𝑣 𝜕𝑣 |
Similarly, the Jacobian of 𝑢, 𝑣, 𝑤 with respect to 𝑥, 𝑦, 𝑧 is =
𝜕(𝑥,𝑦,𝑧) | 𝜕𝑥 𝜕𝑦 𝜕𝑧 |
𝜕𝑤 𝜕𝑤 𝜕𝑤
𝜕𝑥 𝜕𝑦 𝜕𝑧

University of Mysore Page 42


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

𝝏(𝒖,𝒗)
1. If 𝒖 = 𝒙𝟐 − 𝟐𝒚 and 𝒗 = 𝒙 + 𝒚, find 𝑱 = .
𝝏(𝒙,𝒚)
Input:
‘u(x, y) = u: x^2 - 2*y;
‘v(x, y) = v: x + y;
J: jacobian([u, v], [x, y]);
D: determinant(J);

Output:
u(x, y) = x2 - 2y
v(x, y) = y + x
2𝑥 −2
[ ]
1 1
2x + 2

𝝏(𝒙,𝒚,𝒛)
2. If 𝒙 = 𝒓 𝐬𝐢𝐧(𝜽) 𝐜𝐨𝐬(𝝋), 𝒚 = 𝒓 𝐬𝐢𝐧(𝜽) 𝐬𝐢𝐧(𝝋) and 𝒛 = 𝒓 𝐜𝐨𝐬(𝜽), find 𝑱 = .
𝝏(𝒓,𝜽,𝝋)
Input:
kill(all)$
'x = x: r*sin(theta)*cos(%phi);
'y = y: r*sin(theta)*sin(%phi);
'z = z: r*cos(theta);
J: jacobian([x, y, z], [r, theta, %phi]);
D: trigsimp(determinant(J));

Output:
𝑥 = cos(𝜑) 𝑟 sin(θ)

𝑦 = sin(𝜑) 𝑟 sin(θ)

𝑧 = 𝑟 cos(θ)

cos(𝜑) sin(θ) cos(𝜑) 𝑟 cos(θ) − sin(𝜑) 𝑟 sin(θ)


[ sin(𝜑) sin(θ) sin(𝜑) 𝑟 cos(θ) cos(𝜑) 𝑟 sin(θ) ]
cos(θ) − 𝑟 sin(θ) 0

𝑟 2 sin(θ)

University of Mysore Page 43


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Exercise:

𝜕(𝑢,𝑣)
1. If 𝑢 = 2𝑥𝑦, 𝑣 = 𝑥 2 − 𝑦 2 , find 𝐽 = .
𝜕(𝑥,𝑦)
𝜕(𝑢,𝑣)
2. If 𝑢 = 𝑒 𝑦 sec(𝑥), 𝑣 = 𝑒 𝑦 tan(x), find 𝐽 = .
𝜕(𝑥,𝑦)
𝜕(𝑥,𝑦) 𝜕(𝑟,𝜃)
3. If 𝑥 = 𝑟 cos 𝜃 , 𝑦 = 𝑟 sin 𝜃, find 𝐽 = and 𝐽′ = . Verify 𝐽𝐽′ = 1.
𝜕(𝑟,𝜃) 𝜕(𝑥,𝑦)
𝜕(𝑢,𝑣,𝑤)
4. If 𝑢 = 𝑥𝑦𝑧, 𝑣 = 𝑥𝑦 + 𝑦𝑧 + 𝑧𝑥, 𝑤 = 𝑥 + 𝑦 + 𝑧, find 𝐽 = .
𝜕(𝑥,𝑦,𝑧)
𝑥𝑦 𝑦𝑧 𝑧𝑥 𝜕(𝑢,𝑣,𝑤)
5. If 𝑢 = ,𝑣= ,𝑤= , find 𝐽 = .
𝑧 𝑥 𝑦 𝜕(𝑥,𝑦,𝑧)

University of Mysore Page 44


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

8. LINE INTEGRALS

To evaluate line integral with constant limits and variable limits.

A curve C defined by 𝒙 = 𝒇(𝒕), 𝒚 = 𝒈(𝒕), 𝒂 ≤ 𝒕 ≤ 𝒃 is said to be smooth curve if it is


continuous and has unique tangent at each of its points.
A curve C is said to be piecewise smooth curve in [a, b] if it is composed of finite
number of smooth curves.
Let C be a piecewise smooth curve defined by 𝒙 = 𝒇(𝒕), 𝒚 = 𝒈(𝒕), 𝒂 ≤ 𝒕 ≤ 𝒃.
Let P and Q be two continuous functions of x and y defined at every point on the
curve C. Then the integral defined by
.

∫ 𝑷𝒅𝒙 + 𝑸𝒅𝒚
𝑪

is called the Line integral of P dx + Q dy along the curve.

Line integral with constant limits


.
Maxima program to evaluate ∫𝑪 𝒚𝒅𝒙 − 𝒙𝒅𝒚 along the curve 𝒚 = 𝒙𝟐 from
(0, 0) to (1, 1).

INPUT: OUTPUT:

University of Mysore Page 45


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

Line integral with variable limits


Maxima program to evaluate ∫ 𝒚 𝒅𝒙 + 𝒙 𝒅𝒚 − 𝒛𝟐 𝒅𝒛 along 𝒙 = 𝒔𝒊𝒏(𝒕) 𝒂𝒏𝒅 𝒚 =
𝒄𝒐𝒔(𝒕), 𝒛 = 𝒕𝟐 , 𝒘𝒉𝒆𝒓𝒆 𝟎 ≤ 𝒕 ≤ 𝟏.

INPUT: OUTPUT:

Exercise:
Evaluate the following line integrals using Maxima
.
1. ∫𝑪(𝒙 + 𝒚)𝒅𝒙 + (𝒚 − 𝒙)𝒅𝒚 along the curve 𝒙 = 𝒚𝟐 from (1, 1) to (4, 2).
.
2. ∫𝑪 𝒙 𝒅𝒚 − 𝒚 𝒅𝒙 along the curve 𝒚 = 𝒙 from (0, 0) to (1, 1).
.
3. ∫𝑪 𝟓𝒙𝒚𝒅𝒙 + 𝒚𝟐 𝒅𝒚 along the curve 𝒚 = 𝟐𝒙𝟐 from (0, 0) to (1, 2).
4. ∫(𝒙 + 𝒚)𝒅𝒙 + (𝒚 − 𝒙)𝒅𝒚 along 𝒙 = 𝟑𝒕 + 𝟏 𝒂𝒏𝒅 𝒚 = 𝒕 + 𝟏 , 𝒘𝒉𝒆𝒓𝒆 𝟎 ≤ 𝒕 ≤ 𝟏.
5. ∫(𝒙𝟐 − 𝒚)𝒅𝒙 + (𝒚𝟐 + 𝒙)𝒅𝒚 along 𝒙 = 𝒕 𝒂𝒏𝒅 𝒚 = 𝒕𝟐 + 𝟏 , 𝒘𝒉𝒆𝒓𝒆 𝟎 ≤ 𝒕 ≤ 𝟏.
6. ∫ 𝟐𝒙𝟐 𝒅𝒙 + (𝟐𝒙𝒛 − 𝒚)𝒅𝒚 + 𝒛 𝒅𝒛 along 𝒙 = 𝟐𝒕, 𝒚 = 𝒕 𝒂𝒏𝒅 𝒛 = 𝟑𝒕 ,
𝒘𝒉𝒆𝒓𝒆 𝟎 ≤ 𝒕 ≤ 𝟏.
7. ∫ 𝒙𝒚 𝒅𝒙 + 𝒙𝒛 𝒅𝒚 + 𝒙𝒚𝒛 𝒅𝒛 along 𝒙 = 𝒆−𝒕 , 𝒚 = 𝒆𝒕 𝒂𝒏𝒅 𝒛 = 𝒕,
𝒘𝒉𝒆𝒓𝒆 𝟎 ≤ 𝒕 ≤ 𝟏.

University of Mysore Page 46


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

9. DOUBLE INTEGRALS
To evaluate double integral with constant limits and variable limits

The double integral of the function 𝒇(𝒙, 𝒚) over the domain D is given by
.

∬ 𝒇(𝒙, 𝒚) 𝒅𝒙 𝒅𝒚
𝑫

Double integral with constant limits


𝟑 𝟐
Maxima program to evaluate ∫𝟎 ∫𝟏 𝒙𝒚(𝟏 + 𝒙 + 𝒚) 𝒅𝒙 𝒅𝒚.
INPUT:

Double integral with variable limits


𝟐 𝟑𝒚
Maxima program to evaluate ∫𝟏 ∫𝟎 𝒚 𝒅𝒙 𝒅𝒚.
INPUT:

Exercise:
Evaluate the following double integrals using Maxima
𝝅 𝝅
𝟑 𝟏
1. ∫𝟐 ∫𝟎 𝒙𝒚𝒆𝒙 𝒅𝒙 𝒅𝒚 . 2. ∫𝟎 ∫𝟎 𝒔𝒊𝒏𝒙 𝒄𝒐𝒔𝒚 𝒅𝒙 𝒅𝒚.
𝟐 𝟔

𝟏 𝟏 𝟏 𝟐 𝟒
3. ∫𝟎 ∫𝟎 𝒅𝒙 𝒅𝒚. 4. ∫𝟏 ∫𝟑 (𝒙𝒚 + 𝒆𝒚 )𝒅𝒚 𝒅𝒙.
√(𝟏−𝒙𝟐 )(𝟏−𝒚𝟐 )

𝟒 𝟐√𝒂𝒙 𝟏 𝟏−𝒙
5. ∫𝟎 ∫𝒙𝟐 𝒅𝒚 𝒅𝒙. 6. ∫𝟎 ∫𝟎 𝒙𝒚 𝒅𝒚 𝒅𝒙.
𝟒𝒂
𝟐 𝒙 𝟏 𝟏 𝒚𝟐 𝒙⁄
𝒚 𝒅𝒙
7. ∫𝟏 ∫𝟎 𝒙𝟐+𝒂𝟐 𝒅𝒚 𝒅𝒙 . 8. ∫𝟎 ∫𝟎 𝒆 𝒅𝒚.

University of Mysore Page 47


I SEM B.Sc. (NEP) MATHEMATICS LAB MANUAL

10. TRIP[LE INTEGRALS


To evaluate triple integral with constant limits and variable limits

The triple integral of the function 𝒇(𝒙, 𝒚, 𝒛) over the domain D is given by
.

∭ 𝒇(𝒙, 𝒚, 𝒛) 𝒅𝒙 𝒅𝒚 𝒅𝒛
𝑫

Triple integral with constant limits


𝟏 𝟐 𝟐
Maxima program to evaluate ∫𝟎 ∫𝟏 ∫𝟏 𝒙𝟐 𝒚𝒛 𝒅𝒛𝒅𝒚𝒅𝒙.
INPUT:

Triple integral with variable limits


𝟏 𝟑 √𝒙
Maxima program to evaluate ∫𝟎 ∫𝟎 ∫𝒙𝟐 (𝒙 + 𝒚 + 𝒛)𝒅𝒚𝒅𝒛𝒅𝒙.
INPUT:

Exercise:
Evaluate the following triple integrals using Maxima
𝟐 𝟏 𝟏 𝟐 𝟐 𝟐 𝒙 𝒚 𝒛
1. ∫𝟏 ∫𝟎 ∫−𝟏(𝒙𝟐 + 𝒚𝟐 + 𝒛𝟐 ) 𝒅𝒛 𝒅𝒚 𝒅𝒙. 2. ∫𝟏 ∫𝟏 ∫𝟏 (𝒚 + 𝒛 + 𝒙) 𝒅𝒛 𝒅𝒚 𝒅𝒙.

𝟏 𝟏 𝟏 𝟏 𝟏 𝟏
3. ∫𝟎 ∫𝟎 ∫𝟎 𝒆𝒙+𝒚+𝒛 𝒅𝒙 𝒅𝒚 𝒅𝒛. 4. ∫𝟎 ∫𝟎 ∫𝟎 𝒙𝒚𝟐 𝒛𝟑 𝒅𝒙 𝒅𝒚 𝒅𝒛.

𝟏 𝟏−𝒛 𝒚𝟐 𝟏 𝟏 𝟏
5. ∫𝟎 ∫𝟎 ∫𝟎 𝒙 𝒅𝒙 𝒅𝒚 𝒅𝒛. 6. ∫𝟎 ∫𝟎 ∫√𝒙𝟐+𝒚𝟐 𝒙𝒚𝒛 𝒅𝒛 𝒅𝒚 𝒅𝒙.

𝒂 𝒙 𝒙+𝒚 𝟏 𝒙 𝒙+𝒚
7. ∫𝟎 ∫𝟎 ∫𝟎 𝒆𝒙+𝒚+𝒛 𝒅𝒛 𝒅𝒚 𝒅𝒙. 8. ∫𝟎 ∫𝟎 ∫𝟎 (𝒙 + 𝒚 + 𝒛) 𝒅𝒛 𝒅𝒚 𝒅𝒙.

University of Mysore Page 48

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy