0% found this document useful (0 votes)
6 views5 pages

SLG Phy4 15.1 Commands Diff and Integrate

This lesson focuses on using Maxima software to solve problems in classical mechanics through differentiation and integration. Students will learn to apply the 'diff' and 'integrate' commands to mathematical functions, enhancing their problem-solving skills and self-reliance. The lesson includes practical examples and exercises to reinforce the concepts taught.

Uploaded by

Ian Cris E Abon
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
0% found this document useful (0 votes)
6 views5 pages

SLG Phy4 15.1 Commands Diff and Integrate

This lesson focuses on using Maxima software to solve problems in classical mechanics through differentiation and integration. Students will learn to apply the 'diff' and 'integrate' commands to mathematical functions, enhancing their problem-solving skills and self-reliance. The lesson includes practical examples and exercises to reinforce the concepts taught.

Uploaded by

Ian Cris E Abon
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/ 5

Subject Code PHY 1 Physics 4

Module Code 15.0 Equations and Functions


Lesson ​Code 15.1 Commands ​diff​ and i​ ntegrate
Time Frame 30 minutes

TA​1 ATA​2
Components Tasks
(min) (min)
Target At the end of this lesson, the student should be able to:
● solve problems in classical mechanics; 1
● use Maxima in solving for variables in equations and
functions;
● develop self confidence in learning a software program;
and
● show self-reliance in working independently.
Hook If you are careless when doing chain rule in differentiation or 1
you keep forgetting integrals in the table of integration,
computer aided differentiation and/or integration is your friend
to lean on. Learning how to use ​diff and ​integrate commands in
Maxima will help you solve kinematic equations, equations of
motions and electromagnetism.
Ignite Differentiation of mathematical expressions in Maxima is 15
handled by the function ​diff​ using the following syntax

.
The function takes the arguments f (x) , x , and n which are the
mathematical function, independent variable, and order of
differentiation,n respectively. It is equivalent to the mathematical
d f
expression dxn or n​th​-derivative of ​f w ​ ith respect to ​x​. In
physics, you will encounter differentiations involving 1​st and/or
2​nd​ order.

Consider f (x) = x3 − 2x2 + x + 4 in figure 1 below. When


writing mathematical expressions like functions, do not forget
to use “: =” to assign an expression to a function. It2 can be
df d f
shown that f 1(x) = f ′(x) = dx and f 2(x) = f ′′(x) = dx2 . Note
that the expression ​diff​( ​f(x), x, n​) is wrapped inside ′′() to tell
Maxima to get the derivative first before assigning the result to
the left-hand side or function name. It is important to specify
with respect to what variable you are differentiating the
df
function. You can easily recognize that dy = 0 since f is a
function of x only. Note that when n = 1 , you need not write
the third argument. Maxima will do a first order differentiation
by default (see f 1(x) and h1(x) in figure 1). Otherwise, when

1
Time allocation suggested by the teacher.
2
Actual time allocation spent by the student (for information purposes only).

Physics 4 Equations and Functions Page 1 of 5


n > 1 , you must write the order of differentiation explicitly.

Figure 1​. Input commands and output expressions using diff on a


given function.

On the other hand, integration in Maxima is handled by the


function ​integrate.​ For definite integration, we use the syntax

where f (x) and x are the mathematical function and variable of


integration, respectively. This expression is equivalent to
∫ f (x) dx [eqn. 1]
For definite integrals, we use the syntax

where x1 and x2 are the limits of integration. These limits can


be given numerical values or unknown quantities. The
expression above corresponds to

x2
∫ f (x) dx [eqn. 2]
x1

Consider f (x) = 2x + 1 in figure 2 below. It can be shown that


its integral is x2 + x + C . Note that + C is explicitly added to
the expression outside the “( ) wrapper. This is the same as
adding a constant after “evaluating” an indefinite integral. For
the definite integral, the constant is no longer added since they
will just cancel later when the resulting integral is evaluated at
the limits.

Physics 4 Equations and Functions Page 2 of 5


Figure 2​. Input commands and output expressions using integrate on
a given function.

Example 1: Consider a particle whose velocity vs. time is given


by the function v (t) = 3t2 + 4t − 5 , in SI units. Determine the
particle’s (a) acceleration as a function of time and (b) position
as a function of time if the particle is initially at x = 5.0 m.

Navigate Nongraded Exercise 10


Practice solving the following problems using ​diff and ​integrate
commands whenever applicable.

Consider a particle whose velocity vs. time is given by


v (t) = 3t2 + 4t − 5, in SI units. The particle is at x = 8 m when
t = 2 s. Determine the particle’s:
(a) acceleration when t = 0
(b) position when t = 0
(c) time(s) when the particle is at the origin

Physics 4 Equations and Functions Page 3 of 5


Physics 4 Equations and Functions Page 4 of 5
Knot In summary, you can differentiate and integrate mathematical 3
expression in Maxima using the commands

These expressions have to be wrapped inside “( ) for them to be


evaluated first before assigning to a function using “:=”
symbols.

References:
Maxima.sourceforge.net​. Maxima, a Computer Algebra System.
Version 5.34.1 (2014). ​http://maxima.sourceforge.net/

Prepared by: Gerold C. Pedemonte Reviewed by: Lara Gay M. Villaruz

Position: Special Science Teacher IV Position: Special Science Teacher II

Campus: Main Campus Campus: Central Mindanao Campus

Physics 4 Equations and Functions Page 5 of 5

You might also like