Download as pdf or txt
Download as pdf or txt
You are on page 1of 72

This is to certify that Mr/Ms ________________________ a student of . .. ..

. FY.BSC-CS Roll no: ____ has completed the required number of practicals

in the subject of _________________________________ as prescribed by the ..

. UNIVERSITY OF MUMBAI under my supervision during the academic year . ..

. 2022-2023.

______________ _____________
. Course Co-ordinator Prof. Incharge

______________ ______________

External Examiner Principal

Date: _______________ College Seal


Prof. Name : Ms. Trupti Shinde Class / Sem : F.Y. B.Sc. - CS / Sem – II (2022-2023)
Course Code : USCSP205 Subject Name : Calculus

Sr.
No. Date INDEX Pg.
No. Sign.

Practical-1 : Review of Basic Concepts –


a. Functions of one variable, its domain and range, Operations onfunctions
1 / / b. Limits of functions of one variable …… ……
c. Continuity of functions of one variable
d. Derivatives of functions of one variable

Practical-2 : Applications of Derivatives I –


a. Increasing and Decreasing functions
2 / / b. Concavity and inflection points …… ……
c. Relative Extrema
d. Absolute Extrema
Practical-3 : Applications of Derivatives II –
a. Analysis of polynomials
3 / / b. Graphing rational functions …… ……
c. Graphs With Vertical Tangents And Cusps
d. Newton’s method to find approximate solution of an equation
Practical-4 : Integration –
a. Finding area using rectangle method and antiderivative method
4 / / b. Indefinite and definite integrals …… ……
c. Properties of integrals
d. Numerical integration using Simpson’s rule.
Practical-5 : Applications of Integration –
5 / / a. Area between two curves …… ……
b. Length of a plane curve
Practical-6 : Differential Equations –
a. Solution of a first order first degree differential equation using variableseparable method
6 / / b. Solution of a first order linear differential equation using integratingfactor …… ……
c. Numerical solution of first-order equations using Euler‟s method
d. Modeling using differential equation

Practical-7 : Functions of Several Variables –


a. Functions of two or more variables, its domain and range, Operationson functions, level
7 / / curves …… ……
b. Limits of functions of two or three variables
c. Continuity of functions of two or three variables

Practical-8 : Partial Derivatives I –


a. derivatives of functions, First and Second order partial derivatives, Mixed
8 / / derivative theorem, Higher order partial derivatives …… ……
b. Differential for functions of two or three variables
c. Local linear approximation for functions of two or three variables
Practical-9 : Partial Derivatives II –

9 / / a. Chain rule for functions of two or three variables …… ……


b. Implicit differentiation
c. Directional derivatives and gradient
Practical-10 : Applications of Partial Derivatives–
10 / / a. Tangent Planes and Normal Vectors for functions of two or threevariables …… ……
b. Maxima and Minima of Functions of Two Variables

*******
Theory- 1

Review of Basic Concepts -

a. Functions of one variable, its domain and range, Operations on functions

A function is a relation from a set of inputs to a set of possible outputs where each input is related to
exactly one output.
The domain of a function is the complete set of possible values of the independent variable.
The range of a function is the complete set of all possible resulting values of the dependent variable
(y, usually), after we have substituted the domain.
In Sage Math, functions can be defined using the def keyword and operations on
functions can be performed using standard mathematical operations like addition,
subtraction, multiplication, and division.

In Geogebra, functions can be defined using the f(x) = syntax and operations on
functions can be performed using standard mathematical operations. For
example, to define the function f(x) = x^2 and g(x) = x+ 1, you would do the
following:
• Click the "New Function" button and enter f(x) = x^2.
• Repeat step 1 for the function g(x) =x+ 1.
• To add the functions, enter h(x) = f(x) + g(x) into the input bar.
• Repeat step 3 for subtraction, multiplication, and division.
• These examples demonstrate the basic syntax for defining and performing
operations on functions in Sage Math and Geogebra.

b. Limits of functions of one variable


The concept of limits is fundamental in calculus and it is used to describe the
behaviour of a function near a certain value or as the input approaches a certain
value.
In Sage Math, limits can be calculated using the limit() function.

In Geogebra, limits can be approximated graphically by zooming in on a specific


part of the graph of the function and observing the value that the function
approaches. For example, to approximate the limit of a function f(x) = x^2 as
x approaches 2:
• Create the graph of the function f(x) = x^2.
• Zoom in on the point (2, 4) by selecting the zoom tool and clicking and
dragging a box around the point.
• Repeat step 2 several times to observe the behavior of the function as x
approaches 2. The value that the function approaches as X approaches 2
is the limit of the function at that point.

1
c. Continuity of functions of one variable
Continuity of a function of one variable is a property that ensures that the function
does not have any sudden jumps or breaks at any points in its domain. In other
words, a continuous function has a well-defined value for every point in its
domain and the value of the function changes smoothly as the input changes.

In Sage Math, the continuity of a function can be determined analytically using


the limit definition of continuity. A function is continuous at a point if the limit of
the function as the input approaches that point exists and is equal to the value of
the function at that point.

In Geogebra, the continuity of a function can be determined graphically by


observing the behavior of the function near a certain point. If the graph of the
function is a smooth curve with no breaks or jumps at the point, then the function
is continuous at that point. For example, to determine the continuity of the
function f(x) = x^2 at the point 2:
• Create the graph of the function f(x) = x^2.
• Zoom in on the point (2, 4) by selecting the zoom tool and clicking and
dragging a box around the point.
• Observe the behavior of the function near the point (2, 4). If the graph is a
smooth curve with no breaks or jumps at the point, then the function is
continuous at that point.

d. Derivatives of functions of one variable

The derivative of a function of one variable is a measure of how the function


changes as its input changes. In calculus, derivatives are used to study the local
behavior of a function and to find the maximum and minimum values of the
function.
In Sage Math, derivatives can be calculated using the diff() function.

In Geogebra, derivatives can be calculated using the Tangent tool. To find the
derivative of the function f(x) = x^2 at the point 2:
• Create the graph of the function f(x) = x^2.
• Select the Tangent tool and click on the point (2, 4) on the graph
• A tangent line will be drawn on the graph, and the slope of the tangent line
is equal to the derivative of the function at that point.

2
Practical 1

Review of Basic Concepts -


a. Functions of one variable, its domain and range, Operations on functions

Ex-1)
To define the function f(x) = x^2 and g(x) = x + 1 and perform operations on it you would do
the following:
Code:

Output:

3
Ex-2)
To find the domain and range of x^2
Code:

Output:

4
b. Limits of functions of one variable

Ex-1)
To calculate the limit of a function f(x) =x^2 as x approaches 2, you would do the
Following:
Code:

Output:

c. Continuity of functions of one variable


Ex-1)
To determine the continuity of the function
f(x) = x^2 at the point 2, you would do the following:

Code:

Output:

5
d. Derivatives of functions of one variable
Ex-1)
To calculate the derivative of the function f(x)=x^2, you would do the
Following:
Code:

Output:

6
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. What is a function?
2. What is Domain and Co-Domain of a function?
3. What is Image and Pre-image of a function?
4. What is Range of a function?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

7
Theory- 2

Applications of Derivatives I-

a. Increasing and Decreasing functions

A function is said to be increasing on an interval if, as the input increases, the


value of the function also increases on that interval.

A function is said to be decreasing on an interval if, as the input increases, the


value of the function decreases on that interval
.
The derivative of a function provides information
about its local behavior, which can be used to determine whether the function is
increasing or decreasing.

In Sage Math, the first derivative of a function can be used to determine whether
it is increasing or decreasing. If the derivative of the function is positive on an
interval, then the function is increasing on that interval. If the derivative of the
function is negative on an interval, then the function is decreasing on that
interval.

In Geogebra, the first derivative of a function can also be used to determine


whether it is increasing or decreasing. To determine whether the function f(x) =
x^2 is increasing or decreasing on the interval [0, 2]:
• Create the graph of the function f(x) = x^2.
• Calculate the derivative of the function using the Tangent tool.
• Draw the graph of the derivative function.
• Observe the sign of the derivative function on the interval [0, 2]. If the
derivative function is positive on that interval, then the function is
increasing on that interval. If the derivative function is negative on that
interval, then the function is decreasing on that interval.

These examples demonstrate the basic methods for determining whether a


function is increasing or decreasing using derivatives in Sage Math and
Geogebra.

8
b. Concavity and inflection points
The concavity of a function refers to the manner in which the function bends. A
function is said to be concave up if, as the input increases, the rate of change of
the funcion increases. A function is said to be concave down if, as the input
increases, the rate of change of the function decreases. An inflection point is a
point on a function where the concavity changes.

In Sage Math, the second derivative of a function can be used determine its
concavity and find its inflection points. If the second derivative of the function is

positive, then the function is concave up. If the second derivative of the function
is negative, then the function is concave down. To find the inflection points of the
function, you can find the points where the second derivative is equal to 0 or
does not exist.
In Geogebra, the second derivative of a function can also be used to determine
its concavity and find its inflection points. To determine the concavity and find the
inflection points of the function f(x) = x^3:
• Create the graph of the function f(x) = x^3.
• Calculate the first derivative of the function using the Tangent tool.
• Calculate the second derivative of the first derivative using the Tangent
tool.
• Observe the sign of the second derivative function to determine the
concavity of the original function.
• Find the points where the second derivative function is equal to 0 or does
not exist to find the inflection points of the original function.
These examples demonstrate the basic methods for determining the concavity
and finding the inflection points of a function using derivatives in Sage Math and
Geogebra.

c. Relative Extrema
The relative extrema of a function are the local maximum and minimum values of
the function. The absolute extrema of a function are the global maximum and
minimum values of the function over its entire domain.

In Sage Math, the first derivative ofa function can be used to find its relative
extrema.
In Geogebra, the first derivative of a function can also be used to find its relative
extrema. To find the relative extrema of the function f(x) = x^3:
• Create the graph of the function f(x) = x^3.
• Calculate the first derivative of the function using the Tangent tool.
• Find the points where the first derivative is equal to 0 or does not exist to
find the relative extrema of the function.

9
d. Absolute Extrema
To find the absolute extrema of the function, you can evaluate the function at the
endpoints of its domain and compare the values to the values of the function at
the relative extrema.
To find the absolute extrema of the function, you can evaluate the function at the
endpoints of its domain and compare the values to the values of the function at
the relative extrema. To find the absolute extrema of the function f(x) = x^3 over
the interval [-1, 1]:
• Create the graph of the function f(x) FX^3.
• Evaluate the function at the endpoints of the interval-1, 1].
• Find the relative extrema of the function as described above.
• Compare the values of the function at the endpoints and relative extrema
to determine the absolute extrema.

10
Practical 2

Applications of Derivatives I-

a. Increasing and Decreasing functions

Ex-1)
To determine whether the function f(x) = x^2 is increasing
or decreasing on the interval [0, 2] you would do the following:
Code:

Output:

11
b. Concavity and inflection points
Ex-1) To determine the concavity and find the inflection
points of the function f(x) = x^3, you would do the following:
Code:

Output:

12
c. Relative Extrema
Ex-1) To find the relative extrema of the function f(x) = 2x^3-15x^2+36x+10, you would do the
following:
Code:

Output:

13
d. Absolute Extrema

Ex-1) To find the absolute extrema of the function x^4 - 2x^3 over the interval [-2,2]:
Code:

14
Output:

15
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1.How to identify if a function is an increasing function?
2. How to identify if a function is a decreasing function?
3. How to find Maxima of a function?
4. How to find Minima of a function?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

16
Theory- 3

Applications of Derivatives II -

a. Analysis of polynomials

In Sage Math, one can use the diff function to find the derivative of a polynomial,
and the solve function to find the critical points.
We can use the second derivative test to determine
whether the critical points correspond to local maxima, minima, or inflection
points.
In Geogebra, one can plot the polynomial and its derivatives using the "Function"
tool, and then use the "Minimum" and "Maximum" tools to find the local extrema.
The critical points can be found by finding the roots of the derivative. The second
derivative can be found by differentiating the derivative and using the second
derivative test to determine the nature of the critical points.

b. Graphing rational functions


In Sage Math and Geogebra, derivatives of rational functions can be used for:

• Sketching the graph of the rational function and its derivatives, including
vertical and horizontal asymptotes, critical points, and inflection points.
• Finding the maximum and minimum values of a rational function on a given
interval, by analyzing its critical points and asymptotes.
• Investigating the behavior of a function near a specific point, by finding its
Taylor polynomial and using that to approximate the function's value.

In Sage Math, one can use the diff function to find the derivative of a rational
function, and the solve function to find the critical points.

In Geogebra, one can plot the rational function using the "Function" tool, and
then use the "Minimum" and "Maximum" tools to find the local extrema. The
critical points and asymptotes can be found by finding the roots of the numerator
and denominator and analyzing the behavior of the function as x approaches
infinity or zero.

17
c. Graphs With Vertical Tangents And Cusps

In Sage Math and Geogebra, derivatives can be used to analyze the behavior of
a function near a vertical tangent or a cusp.

• Vertical Tangent: A function has a vertical tangent at a critical point if its


first derivative is undefined at that point. To find the vertical tangent, one
can examine the behavior of the function near the critical point, such as
finding the limit of the function as x approaches the critical point from both
sides.

• Cusp: A function has a cusp at a critical point if its first derivative is 0 at


that point and its second derivative changes sign at that point. To find the
cusp, one can examine the behavior of the function and its derivatives near
the critical point, such as finding the Taylor polynomial of the function and
using that to approximate the function's value near the critical point.

In Sage Math, one can use the diff function to find the first and second
derivatives of a function, and the solve function to find the critical points.

In Geogebra, one can plot the function using the "Function" tool, and then use
the "Tangent" tool to find the vertical tangent. The cusp can be found by
examining the behavior of the function near a critical point, such as finding the
Taylor polynomial of the function and using that to approximate the function's
value near the critical point.

18
d. Newton"s method to find approximate solution of an equation

Newton's method is an iterative algorithm that can be used to find approximate


solutions of nonlinear equations. The idea behind the method is to use the
tangent line to the function at an initial guess to find a better approximation to the
solution.
In Sage Math and Geogebra, Newton's method can be implemented as follows:
Define the function f whose root we want to find.
• Choose an initial guess x0 for the solution.
• Find the first derivative df of f.
• Update the approximation to the solution using the formula: x1 = x0 -
f(x0)/df(x0)
• Repeat steps 3 and 4 until the desired accuracy is achieved.

In Sage Math, one can use the diff function to find the derivative of a function and
the subs function to evaluate the function and its derivative at a specific point.

In Geogebra, one can plot the function using the "Function" tool, and then use
the "Tangent" tool and the "Point" tool to find the tangent line at the initial guess
and the intersection of the tangent line with the x-axis, respectively. The
intersection point can then be used as the next approximation to the solution, and
the process can be repeated until the desired accuracy is achieved.

19
Practical 3
Applications of Derivatives II -

a. Analysis of polynomial
Ex-1) For example, if you have the polynomial f(x) = x^3 + X^2 - 3x + 2, you can find its first
derivative as follows

Code:

Output:

20
b. Graphing rational functions
Ex-1)
For example, if you have the rational function f(x) = (x^2 + 1)/(x^3-2x + 2), you can find its first
derivative as follows:
Code:

Output:

21
Ex-2) To find the vertical and horizontal asymptotes, we need to consider the behavior of the
function as x approaches infinity or zero:
Code:

Output:

22
c. Graphs With Vertical Tangents And Cusps
Ex-1) To plot x^⅓
Code:

23
Output:

24
d. Newton"s method to find approximate solution of an equation
Ex-1)
To find an approximate solution to the equation f(x) = x^2 - 2=0
using Newton's method, we could write:
Code:

25
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. Which function is used to find the derivative of a function?
2. Which function is used to plot the graph?
3. What is critical points of a function?
4. What is the formula of Newton's method?
For Faculty Use

Correction Formative Assessment Timely completion of Attendance Learning


parameters [ ] practical [ ] Attitude [ ]

26
Theory- 4

Integration -

a. Finding area using rectangle method and antiderivative method

In Sage Math and Geogebra, there are two main methods for finding the area
under a curve: the rectangle method and the antiderivative method.
Rectangle Method: This method approximates the area under the curve by
dividing the interval of integration into subintervals and summing the areas
of rectangles inscribed in each subinterval. The height of each rectangle is
the value of the function at the right endpoint of the subinterval.

In Sage Math, one can use the integral function to find the definite integral of a
function, and the linspace function to generate the subintervals.

In Geogebra, one can plot the function using the "Function" tol, and then use
the "Integral" tool with the rectangle method to find the area under the curve.
• Antiderivative Method: This method uses the fundamental theorem of
calculus, which states that the derivative of an antiderivative of a function is
the function itself. In other words, if F is an antiderivative of f, then f= F'.
Given a function f, we can find its antiderivative F and use it to find the
definite integral of f by computing F(b) - F(a), where a and b are the limits
of integration.

In Sage Math, one can use the integral function to find the antiderivative of a
function.

In Geogebra, one can plot the function using the "Function" tool, and then use
the "Integral" tool with the antiderivative method to find the area under the curve.

27
b. Indefinite and definite integrals

In Sage Math and Geogebra, one can find both indefinite and definite integrals of
functions.
Indefinite Integral: An indefinite integral of a function is an antiderivative of
the function, which is a function whose derivative is the original function. In
other words, if F is an indefinite integral of f, then f = F.

In Sage Math, one can use the integral function to find the indefinite integral of a
function.

In Geogebra, one can plot the function using the "Function" tool, and then use
the "Integral" tool to find the indefinite integral of the function.

• Definite Integral:A definite integral of a function over an interval [a, b] is


the signed area under the curve between a and b. It can be computed by
finding the antiderivative of the function, and then evaluating it at b and a.

In Sage Math, one can use the integral function to find the indefinite integral of a
function, and then evaluate it at the limits of integration to find the definite
integral.
In Geogebra, one can plot the function using the "Function" tool, and then use
the "Integral" tool to find the definite integral of the function by specifying the
limits of integration.

c. Properties of integrals

In Sage Math and Geogebra, one can explore and analyze the properties of
integrals.
• Linearity: The definite integral of a sum of two functions is equal to the sum
of the definite integrals of the individual functions. That is, if f(x) and g(x)
are integrable on the interval [a, b], then:
∫_a^b (f(x)+ g(x) dx = ∫_a^b f(x) dx+∫_a^b g(x) dx

This property can be verified by finding the definite integrals of f(x) and g(x)
separately and then adding the results.

• Constant Multiple: The definite integral of a constant multiple of a function


is equal to the constant multiple of the definite integral of the function. That
is, if f(x) is integrable on the interval [a, b] and k is a constant, then:
∫_a^b (k * f(x) dx = k*∫_a^b f(x) dx

This property can be verified by finding the definite integral of f(x) and then
multiplying the result by the constant k.

28
• Additivity: The definite integral of a function over the union of two disjoint
intervals is equal to the sum of the definite integrals of the function over the
individual intervals. That is, if f(x) is integrable on the intervals [a, b] and [c,
d] with b <c, then:
∫_a^d f(x) dx = ∫_a^b f(x) dx + ∫_c^d f(x) dx

This property can be verified by finding the definite integrals of f(x) over the
individual intervals and then adding the results.

In Sage Math, these properties can be demonstrated by finding the definite


integrals of functions and verifying that the properties hold.

In Geogebra, one can plot the functions and use the "Integral" tool to find the
definite integrals of the functions, and then verify the properties by performing the
operations and comparing the results.

d. Numerical integration using Simpson's rule.

Simpson's rule is a method for approximating definite integrals by dividing the


interval of integration into a number of subintervals and approximating the
integrand by a polynomial of degree 2 on each subinterval. The sum of the areas
of these polynomials gives an estimate of the definite integral.

In Sage Math, one can use the numerical_integral function to approximate the
definite integral using Simpson's rule. The function takes as input the function to
be integrated, the lower and upper bounds of the interval of integration, and the
number of subintervals to use.

In Geogebra, one can use the "Numeric" tool under the "Calculus" menu to
approximate the definite integral using Simpson's rule. The tool requires the
function to be integrated, the lower and upper bounds of the interval of
integration, and the number of subintervals to use. The result of the approximation
is displayed on the screen and can also be saved in a variable for
further analysis.

29
Practical 4

a. Finding area using rectangle method and antiderivative method


Ex-1)
To find the area under the curve f(x) = x^2 on the interval [0,2] using the rectangle
method with n subintervals, We could write:
Code:

Output:

30
b. Indefinite and definite integrals
Ex-1)
To find the indefinite integral of f(x) = x^2, we could write:
Code:

Output:

Ex-2)
To find the definite integral of f(x) = x^2 on the
interval [0,2], we could write:
Code:

Output:

31
c. Properties of integrals
Ex-1)
To find the definite integral of f(x) = x^2 on the
interval [0,2], we could write:

Output:

Ex-2)
To find the indefinite integral of f(x) = x^2, we could write:
Code:

Output:

32
d. Numerical integration using Simpson's rule.
Ex-1)
An example using the function f(x) = x^3 integrated over the interval [0, 1]
with 10 subintervals:
Code:

Output:

33
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. What is Indefinite Integration?
2. What is Definite Integration?
3. Which function is used to find integration of a function?
4. What is the formula of Simpson's Rule?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

34
Theory- 5

Applications of Integration -

a. Area between two curves

The area between two curves can be found by finding the definite integral of the
difference of the two functions over the interval that defines the region between
the two curves.

In Sage Math, one can use the numerical integral function to approximate the
area between two curves. The function takes as input the difference of the two
functions to be integrated, the lower and upper bounds of the interval of
integration, and the number of subintervals to use.

In Geogebra, one can plot the two functions and use the "Integral between
curves" tool under the "Calculus" menu to find the area between the curves. The
tool requires the two functions, the lower and upper bounds of the interval of
integration, and the number of subintervals to use. The result of the calculation is
displayed on the screen and can also be saved in a variable for further analysis.

b. Length of a plane curve

The length of a plane curve can be found using the definite integral of the square
root of the sum of the squares of the first derivatives of the function defining the
Curve.

In Sage Math, one can use the numerical integral function to approximate the
length of a plane curve. The function takes as input the square root of the sum of
the squares of the first derivatives of the function defining the curve, the lower
and upper bounds of the interval of integration, and the number of subintervals to
use.

In Geogebra, one can plot the function defining the curve and use the "Arc
Length" tool under the "Calculus" menu to find the length of the curve. The tool
requires the function defining the curve, the lower and upper bounds of the
interval of integration, and the number of subintervals to use. The result of the
calculation is displayed on the screen and can also be saved in a variable for
further analysis.

35
Practical 5

Applications of Integration -

a. Area between two curves


Ex-1)
To find the area between the curves f(x) = x^2 and g(x) =x
over the interval [0, 1] :

Code:

Output:

36
Ex-2) To find the area between the curves f(x) = 2x-x^2 and g(x)=x over the interval [0,1].
Code:

Output:

37
b. Length of a plane curve
Ex-1) To find the length of the curve f(x) = x^2 over the interval [0, 1]:
Code:

Output:

Ex-2) Find the arc length of curve y=x^3/2 from (1,1) to (2,√2).
Code:

Output:

38
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. How to find the area under the curve?
2. How to find the integral of a function?
3. Which function is used to find square root of an expression?
4. How to find arc length of curve?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

39
Theory- 6

Differential Equations -

a. Solution of a first order first degree differential equation using variable


separable method

The variable separable method for solving first order first degree differential
equations involves separating the variables and integrating both sides to find the
general solution.

In Sage Math, one can use the desolve function from the diffgral package to find
the solution of a first order first degree differential equation using the variable
separable method. The function takes as input the differential equation, the
variable to be solved for, and the independent variable.

In Geogebra, one can use the "Solve Differential Equation" tool under the
"Calculus" menu to find the solution of a first order first degree differential
equation using the variable separable method. The tool requires the differential
equation, the initial condition, and the independent variable. The result of the
calculation is displayed on the screen and can also be saved in a variable for
further analysis.

b. Solution of a first order linear differential equation using integrating


Factor
The integrating factor method for solving first order linear differential equations
involves multiplying both sides of the equation by a function (the integrating
factor) to make the left-hand side a product rule derivative. This allows one to
integrate both sides of the equation and find the general solution.
In Sage Math, one can use the desolve function from the diffgral package to find
the solution of a first order linear differential equation using the integrating factor
method. The function takes as input the differential equation, the variable to be
solved for, and the independent variable.

In Geogebra, one can use the "Solve Differential Equation" tool under the
"Calculus" menu to find the solution of a first order linear differential equation
using the integrating factor method. The tool requires the differential equation,
the initial condition, and the independent variable. The result of the calculation is
displayed on the screen and can also be saved in a variable for further analysis

40
c. Numerical solution of first-order equations using Euler's method.
Euler's method is a numerical method for approximating the solution ofa
first-order differential equation. The method involves approximating the solution
at discrete time points by using the slope of the solution at the previous time
point.

In Sage Math, one can use a loop to implement Euler's method to approximate
the solution of a first-order differential equation.

In Geogebra, one can use the "Numeric" tool under the "Calculus" menu to find
the numerical solution of a first-order differential equation using Euler's method.
The tool requires the differential equation, the initial condition, the step size, and
the number of steps. The result of the calculation is displayed on the screen and
can also be saved in a variable for further analysis.

d. Modeling using differential equation


In Sage Math, one can model real-world situations using differential equations by
defining the differential equation that describes the system and then solving for
the solution.

41
Practical 6

a. Solution of a first order first degree differential equation using variable


separable method
Ex-1) To solve the differential equation y'= 2x using the variable
separable method:

Code:

Output:

42
b. Solution of a first order linear differential equation using integrating
Factor
Ex-1 )To solve the differential equation y' + 2y =x using the integrating factor method:

Code:

Output:

43
c. Numerical solution of first-order equations using Euler's method.
Ex-1)
To solve the differential equation y' = 2x using Euler's method with a step size of 0.1:
Code:

Output:

44
d. Modeling using differential equation
Ex-1)
For example, consider the following differential equation (dydx(x, y) = x + y) that models the
population growth of a species:
Code:

Output:

45
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. What is differential equation?
2. What is 1st order Differential equation?
3. What is Modelling using a differential equation?
4. What is Euler's method?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

46
Theory- 7

Functions of Several Variables -

a. Functions of two or more variables, its domain and range, Operations


on functions, level curves

The level curves of the function are plotted using the plot_implicit argument of the
plot 3d function, which plots the solutíons to the equation f(x, y) = k for a set of
values of k.

The domain of the function is defined using the domain variable,


which is a predicate that returns True for points in the domain and False for
points outside the domain. The max and min methods find the maximum and
minimum values of the function over the domain defined by domain.

b. Limits of functions of two or three variables


The limit method takes two arguments:
the first is a tuple (x, y) that represents the variables in the function, and the
second is a tuple (0, 0) that represents the point at which the limit is to be
evaluated.
The limit method returns the value of the limit, which in this case is 0.
The limit of a function of three variables can be found in a similar way, by defining
a function of three variables and using the limit method with a tuple of three
variables and a tuple of the values at which the limit is to be evaluated.

c. Continuity of functions of two or three variables


The is continuous method takes a tuple of the values of the variables at which the continuity
is to be checked, in this case (0,0). The is_continuous method returns True if the function is
continuous at the specified point and False otherwise.

The continuity of a function of three variables can be checked in a similar way, by


defining a function of three variables and using the is_continuous method with a
tuple of the values of the variables at which the continuity is to be checked.

47
Practical 7
Functions of Several Variables -

a. Functions of two or more variables, its domain and range, Operations


on functions, level curves
Ex-1) Find the domains and ranges
Code:

48
Ex-2) Perform operations on the functions
Code:

Output:

49
Ex-3) Plot Level Curve
Code:

Output:

50
Ex-4) Plot 3d graph

Code:

Output:

51
b. Limits of functions of two or three variables
Ex-1)
Example of finding the limit of a function of two variables in Sage Math:
Code:

Output:

c. Continuity of functions of two or three variables


Ex-1) Example of checking the continuity of a function of two variables in
Sage Math:
Code:

Output:

52
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. What is a function?
2. How to find limit of a function?
3. How to find continuity of a function?
4. Which function is used to plot 3d graph?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

53
Theory- 8

Partial Derivatives I-

a. Partial derivatives of functions, First and Second order partial


derivatives, Mixed derivative theorem, Higher order partial derivatives

The diff method takes the variable with respect to which the derivative is to be taken as
its argument.

The partial derivatives are stored in the variables df dx, df dy, d2f dx2,
d2f dxdy, and d2f dy2. These variables can be used to calculate higher order
partial derivatives ina similar way.

The mixed derivative theorem states that if a function of two or more variables is
continuously differentiable, then the partial derivatives with respect to different variables commute,
i.e., d^2f/dxdy = d^2f/dydx. This theorem can be verified by comparing the values of d2f dxdy and
d2f dy2.

b. Differential for functions of two or three variables


To find the partial differential of functions of two or three variables in Sage Math,
you can use the diff function.

c. Local linear approximation for functions of two or three variables


In Sage Math, you can use the partial derivatives to find the local linear
approximation of functions of two or three variables.

54
Practical 8

a. Partial derivatives of functions, First and Second order partial


derivatives, Mixed derivative theorem, Higher order partial derivatives

Ex-1)
Example of calculating partial derivatives in Sage Math:
Code:

Output:

55
b. Differential for functions of two or three variables
Ex-1) To find derivative of x^2+y^2
Code:

Output:

c. Local linear approximation for functions of two or three variables


Ex-1) To find
Code:

Output:

56
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. What is partial derivative of a function?
2. What is 1st Order partial derivative?
3. What is 2nd Order partial derivative?
4. What is Mixed Derivative Theorem?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

57
Theory- 9

Partial Derivatives II-

a. Chain rule for functions of two or three variables

A Chain Rule for two or three variables states that when differentiating a composite function of
multiple variables, the derivative of the overall function is equal to the product of all of the individual
derivatives. This can be written as:

Chain Rule for two variables:

f(u,v) = (u ∙ v)' = u' ∙ v + u ∙ v'

Chain Rule for three variables:

f(u,v,w) = (u ∙ v ∙ w)' = u' ∙ v ∙ w + u ∙ v' ∙ w + u ∙ v ∙ w'

The variables x and y are declared as symbolic variables.


The partial derivatives are calculated using the diff function and displayed using
the show function.

b. Implicit differentiation

Implicit differentiation is a method of finding the derivative of a function without having to solve for
the function explicitly. It involves differentiating both sides of an equation (implicitly) with respect to
a given variable. The resulting equation is known as the derivative of the implicit function.

The formula for implicit differentiation is:

dy/dx = (dy/du)(du/dx)

58
c. Directional derivatives and gradient

A directional derivative is a measure of how a multivariable function changes when you move in a
specific direction. It is calculated by taking the dot product of the gradient of the function and the unit
vector of the direction you are moving in. The formula for a directional derivative is:

Df(x,y)/dv = ∇f • v

Where ∇f is the gradient of the function and v is the unit vector of the direction you are moving in.

The gradient of a multivariable function is a vector of partial derivatives. It is a measure of how


quickly the output of the function changes in each dimension. The formula for the gradient of a
function is:

∇f = (∂f/∂x, ∂f/∂y)

Where ∂f/∂x and ∂f/∂y represent the partial derivatives of the function with respect to x and y,
respectively.

59
Practical 9

a. Chain rule for functions of two or three variables


Ex-1)
Code:

Output:

60
b. Implicit differentiation
Ex-1) To find implicit differentiation of √x + √y = √a:
Code:

Output:

61
c. Directional derivatives and gradient
Ex-1)
Here is an example of code in Sage Math for computing the directional derivative
of a function of two variables at a given point in the direction of a given vector:
Code:

Output:

62
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. What is chain rule?
2. What is the formula of chain rule for 2 variable function?
3. What is the formula of chain rule for 3 variable function?
4. What is directional derivative?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

63
Theory- 10

Applications of Partial Derivatives-

a. Tangent Planes and Normal Vectors for functions of two or three


Variables

Tangent planes and normal vectors are mathematical tools used to study and measure the behavior of
functions of two or three variables. A tangent plane is a plane that passes through a point on the
surface of a function and is perpendicular to all points on the surface of the function at that point. A
normal vector is a vector that is perpendicular to the tangent plane at a given point on the surface of
the function.

The formula for a tangent plane at a point (x, y, z) on the surface of a function f(x, y, z) is:

T(x, y, z) = f(x, y, z) + a(x - x₀) + b(y - y₀) + c(z - z₀)

Where a, b, and c are constants determined by taking the partial derivatives of the function f with
respect to x, y, and z respectively.

The formula for a normal vector at a point (x, y, z) on the surface of a function f(x, y, z) is:

n(x, y, z) = (∂f/∂x, ∂f/∂y, ∂f/∂z).

Where ∂f/∂x, ∂f/∂y, and ∂f/∂z are the partial derivatives of the function f with respect to x, y, and z
respectively.

To find Tangent Planes and Normal Vectors for functions of two or three
Variables
1. Open Geogebra and create a function of two or three variables.
2. Select the point at which you want to find the tangent plane and normal vector.
3. Select the “Calculus” tool from the toolbar.
4. Select the “Tangent Plane” option from the “Calculus” menu.
5. Enter the coordinates of the point at which you want to find the tangent plane and normal vector.
6. Geogebra will display the tangent plane and normal vector at the specified point.

64
b. Maxima and Minima of Functions of Two Variables

Maxima and minima of functions of two variables are points where the function takes on an extreme
value, either a minimum or a maximum.

The formulas for finding these points are known as the first and second derivatives.
The first derivative is used to find the critical points of a function.
The critical points of a function are the points where the function changes direction, either increasing
or decreasing.
The second derivative is used to determine if the critical points are maxima or minima. If the second
derivative is positive, then the critical points are maxima.
If the second derivative is negative, then the critical points are minima.

To find the maxima and minima of a function of two variables in Sage Math, you
can use the following steps:
• Define the function of two variables: You need to define the function that you
want to find the maxima and minima of. For example, f(x, y) = x^2 + y^2.

• Find partial derivatives: You need to find the partial derivatives of the function
with respect to x and y. For the example above, the partial derivatives would be
df/dx = 2x and df/dy = 2y.

• Find critical points: The critical points of the function are the points where the
partial derivatives are equal to zero. You can solve the equations df/dx = 0 and
df/dy = 0 to find the critical points. For example, the critical points of f(x, y) = x^2
+ y^2 would be (0, 0).

• Determine if critical points are maxima, minima, or saddle points: To determine if


a critical point is a maxima, minima, or saddle point, you need to find the second
partial derivatives of the function and evaluate them at the critical point. If both
second partial derivatives are positive, it is a minimum. If both are negative, it is a
maximum. If one is positive and the other is negative, it is a saddle point.

• Evaluate the function at the critical points: You can evaluate the function at the
critical points to find the values of the maxima and minima.

65
Practical 10

a. Tangent Planes and Normal Vectors for functions of two or three Variables
Ex-1)To plot a function of two variables and find its tangent plane and normal vector at a point:
Code:

Output:

66
b. Maxima and Minima of Functions of Two Variables
Ex-1) To find Maxima and Minima of f(x,y) = x^3 + y^3 - 6xy
Code:

Output:

67
Result and Discussion :

Learning outcome :

Course outcome :

Conclusion :

Viva Questions :
1. What is tangent plane?
2. What is critical points?
3. What is Maxima of a function?
4. What is Minima of a function?

For Faculty Use


Correction Formative Assessment Timely completion of Attendance Learning
parameters [ ] practical [ ] Attitude [ ]

68

You might also like