---
title: 'Python SymPy Tutorial for Beginners 2026 | Learn SymPy from Scratch | Simplilearn'
source: 'https://youtube.com/watch?v=qDJcLR2Ctgo'
video_id: 'qDJcLR2Ctgo'
date: 2026-10-24
duration_sec: 2774
channel: 'Simplilearn'
---

# Python SymPy Tutorial for Beginners 2026 | Learn SymPy from Scratch | Simplilearn

> Source: [Python SymPy Tutorial for Beginners 2026 | Learn SymPy from Scratch | Simplilearn](https://youtube.com/watch?v=qDJcLR2Ctgo)

## Summary

This video is a comprehensive beginner's tutorial on SymPy, a Python library for symbolic mathematics. It explains the difference between numerical and symbolic computation, demonstrates core features like creating symbols, simplifying expressions, solving equations, performing calculus, working with matrices, and plotting, and concludes with real-world applications in engineering, physics, and machine learning.

### Key Points

- **Introduction to SymPy** [00:27] — SymPy is a Python library for symbolic mathematics, allowing users to work with mathematical symbols and expressions rather than fixed numerical values.
- **Numerical vs Symbolic Computation** [01:44] — Numerical computation deals with fixed numbers (e.g., 5+10=15), while symbolic computation works with unknown quantities (e.g., x^2+5x+6) to understand relationships between variables.
- **Why Use SymPy** [02:54] — SymPy is valuable for complex mathematical problems involving multiple variables and advanced equations, automating tasks like simplification, solving, and calculus that are time-consuming manually.
- **SymPy Capabilities** [04:10] — SymPy supports algebra (simplify, expand, factor), calculus (limits, derivatives, integrals), linear algebra (matrices), and additional areas like statistics, geometry, physics, and plotting.
- **Applications of SymPy** [05:14] — SymPy is used in engineering, physics, data science, AI, education, and research for analyzing and automating mathematical relationships.
- **Setting Up SymPy** [06:33] — The tutorial demonstrates installing SymPy in Google Colab using 'pip install sympy' and importing it with 'import sympy'.
- **Creating Symbols** [08:50] — Symbols are created using 'symbols()', e.g., 'x = symbols('x')'. Unlike normal Python variables, symbols represent unknown mathematical quantities.
- **Expression Manipulation** [11:49] — SymPy can simplify, expand, and factor expressions automatically, e.g., simplifying (x^2-1)/(x-1) to x+1.
- **Solving Equations** [14:31] — SymPy's 'solve()' function finds symbolic solutions for equations, including linear, polynomial, and systems of equations.
- **Working with Functions** [19:52] — Functions can be defined symbolically and evaluated at specific points using the 'subs()' method, e.g., f.subs(x, 2).
- **Calculus Operations** [22:12] — SymPy supports differentiation ('diff()'), integration ('integrate()'), and limits ('limit()'), essential for understanding rates of change and accumulation.
- **Matrices and Linear Algebra** [28:10] — SymPy allows creating matrices and performing operations like determinant and inverse, useful in engineering, graphics, and machine learning.
- **Plotting Functions** [30:23] — SymPy's plotting module visualizes functions, e.g., y=x^2 and y=sin(x), with options to control the range.
- **Advanced Features** [34:23] — SymPy supports differential equations, physics calculations, probability/statistics, and geometry, expanding its applicability.
- **Real-World Applications** [37:16] — Practical examples include rearranging distance=speed*time for speed, calculating kinetic energy, and finding derivatives for machine learning optimization.
- **Conclusion** [45:04] — The course summarizes how SymPy integrates mathematics with Python, enabling exploration, manipulation, and solving of complex problems.

## Transcript

Simple formulas evolve into complex structures. Manual calculations quickly become overwhelming. This is the challenge of modern mathematics.
math. It transforms code into pure symbolic expressions to build a complete mathematical ecosystem. &gt;&gt; Mathematics plays an important role in almost every technical field from engineering and physics to data science
and artificial intelligence. But as mathematical problems become more complex, solving and manipulating equations becomes manually challenging. Imagine working with complex formulas where you need to simplify expressions,
solve equations, calculate derivatives or analyze mathematical relationships. Traditionally, these tasks require manual calculations or specialized mathematical software. But what if we could bring these mathematical
capabilities directly into Python? This is where Simpai becomes useful. Simpsource Python library designed for symbolic mathematics. Unlike traditional numerical computation where we work with fixed values, symbolic computation
allows us to work with mathematical symbols and expressions. Now this means that Python can understand mathematical relationships, manipulate formulas, simplify expressions and solve complex problems. In this course, we will
explore the fundamentals of simp understand how symbolic mathematics works and see how simple mathematical problems through programming. So let's begin by understanding what senpai actually is and why it's important.
Before we understand sai, we need to first understand the concept behind it. calculations, we work with fixed numbers. For example, if we calculate 5 + 10, both values are already known and the result is fixed and this is called
numerical computation. However, many real world problems involve unknown values. For example, an equation like x^2 + 5 x + 6 contains a variable whose value is not known yet. So instead of solving one fixed number, symbolic
mathematics allows us to work with these unknown quantities and understand the relationship between them. Symbolic computation enables computers to represent mathematical expressions, manipulate formulas, simplify equations,
operations while keeping variables unchanged. Now this approach is useful in many fields because professionals often need to understand mathematical relationships before calculating specific values. Simpai brings symbolic
mathematics into Python allowing developers and researchers to work with mathematical concepts programmatically. So now that we understand the idea behind symbolic mathematics, the next question is why do we actually need a
library like simp? The answer lies in the complexity of modern mathematical problems. Simple calculations can easily be performed manually or by basic programming. But when we work with complex expressions, multiple variables,
advanced equations or mathematical models, performing every operation manually becomes time-conuming and very difficult. For example, simplifying a large algebraic expression or finding the derivative of a complex function
requires multiple mathematical steps. Now, this is where simps valuable. Instead of manually performing every calculation, simply allows Python to understand and manipulate mathematical expressions. It can simplify formulas,
solve equations, perform calculus operations and analyze mathematical relationships while preserving the structure of the problem. Another important advantage of simp is that it combines the flexibility of Python with
the capabilities of computer algebra system. Now, this means developers, engineers, researchers, and students can integrate mathematical operations directly into their Python workflows. So whether you're analyzing scientific
formulas, exploring mathematical concepts, or building computational models, Simpai helps make complex mathematics more accessible and programmable. Simplic mathematics library because it supports
a wide range of mathematical operations. One of its major capabilities is algebra. With Simpai, we can work with mathematical expressions, simplify complex formulas, expand equations, factor expressions, and solve algebraic
problems. Another important area is calculus. Simpai can perform operations such as limits, derivatives and integrations which is essential in mathematics, physics, engineering and machine learning. Simp also provides
support for linear algebra through matrices and matrix operations. Now this makes it useful for working with mathematical structures commonly used in scientific computing and data related fields. Now beyond these areas, simp
also includes functionality for topics such as statistics, geometry, physics and mathematical plotting. The key advantage here is that all mathematical operations can be represented and manipulated programmatically using
Python. Instead of using separate tools for different mathematical tasks, SPI different mathematical concepts can be explored and automated. Understanding the capabilities of simp is important
but the real value comes from knowing where it can be applied. Simp is used in relationships need to be analyzed, simplified or automated. One major application area is engineering. Engineers often work with complex
formulas and mathematical models before creating simulations or physical systems. Using symbolic computation, they can manipulate equations, analyze relationships between variables, and verify mathematical models. Another
important area is physics. Many physics concepts are built around mathematical equations that describe motion, energy, forces, and interactions. Simpai helps researchers and students work with these equations symbolically before moving
into numerical calculations. Senai is also valuable in data science and artificial intelligence. Many machine learning concepts rely on mathematical foundations such as derivatives, optimization functions, and matrix
operations. Symbolic computation can help understand and verify these mathematical concepts. Beyond professional applications, simp is also useful for education and research because it allows learners to experiment
with mathematics interactively. The biggest advantage of simp is that it transforms mathematics from something we only calculate into something that we can explore, manipulate and program. So now that we have understood the concepts
behind symbolic mathematics and why Simpai is useful, let's move into the practical part and start working with Simpai. For this demonstration, we will provides a simple Python environment where we can write and execute code
directly from the browser without setting up anything locally. To begin, open Google Collab and create a new notebook. So once the notebook is open, the first step is to install the SIP library. Now simp is an external Python
package. So we need to make sure that it's available in our environment before using it. In most environments, simply may already be installed, but running the installation command ensures that we have the required package. Now, copy the
following command into the first cell and execute it. So, that's pip install simp. So, let's go ahead and run this. Click on the little play button over here. Okay. So, after running this command, Collab will download and
install the Simpai package. You should see a successful installation message indicating that SPI is ready to use. So now that simp is installed the next step is importing it into our Python environment. We will be importing the
library using the following code. Go ahead and click on the three dots here. Over here you can see a plus code option. Here you can insert a new code cell below. So with that being done, let's type our next command which is
import. Run this. Now this line makes all saiy functionality available inside our notebook. Now let's go ahead and verify that simp has been installed correctly. We can check the installed version
using. So in order to check the current version of sai we can just go ahead and type the following command which is simp and uh version followed by underscore when we go ahead and run this. So as you can see the output displayed the current
environment. And this confirms that our setup is complete and we're ready to perform symbolic mathematics using Python. But before we move further, let's understand what we have done here.
At first, we installed the simp package. Second, we imported the library into Python. And finally, we verified that simpy is working correctly. Now, from the next section onwards, we will start creating mathematical symbols and see
expressions differently from normal Python calculations. So, now that our Simpai environment is ready, let's go ahead and start with the most important concept in Simpai, which is symbols. In normal Python programming, when we
create a variable, it usually stores a fixed value. Let's say for example, if we write x is equal to 10, Python understands that x represents the number 10. But in mathematics, we often work with unknown values. Let's say for
example, so in this particular expression here, x doesn't represent a fixed number. It represents an unknown mathematical quantity. Now, this is where simps are different from normal Python variables. Now let's go ahead and
create our first symbolic variable. Now the line of code for that is as follows. the line of code for that is as follows. We type from simp import import symbols. Then we go ahead and type an expression which is x is equal to symbols x
followed by x. So when we executed this code the output will simply show x. Now at first this may look similar to a normal Python variable but internally simp has created a mathematical symbol that can participate in symbolic
calculations. Now let's go ahead and create a mathematical expression using this symbol. Let's go ahead and type expression equals x + 5 followed by the
word expression. Now when we go ahead and run this code the output will be x + 5. Now notice that simply does not try to calculate a final answer because the value of x is still unknown. So instead it keeps a relationship between x and 5.
Now this is the foundation of symbolic computation. Now let's go ahead and create a slightly more complex expression which is so this is the expression followed by the word expression. Here I store the expression
in a variable called expression. Let's go ahead and run this now. So as you can see the output is x^2 + 5 x + 6. Understands this as a mathematical expression instead of just a collection of characters. Now let's go ahead and
create multiple symbols. For many mathematical problems, we need more than just one unknown value. For example, an equation involving x and y. So let's go ahead and create both symbols. For that let's type x y equals symbols followed
let's type x y equals symbols followed by x y in single quotes and expression by x y in single quotes and expression equals x + y. Now when we finally go ahead and type expression and run this as you can see the output is x + y. Now
simp understands that both x and y are symbolic values. Now this ability to work with unknown quantities is what makes saiy different from regular numerical calculations. Now with normal Python we calculate values but with
simpresent mathematical ideas. So now that we understand how symbols work let's move forward and see how we can create simplify and transform mathematical expressions using simp. So now that we
know how to create symbols let's see how simp allows us to work with mathematical expressions. So one of the biggest advantages of simp is that it can automatically understand mathematical structures and perform operations on
them. Now let's go ahead and explore three important operations. factorization. Now let's go ahead and start by creating a mathematical expression. So for that I'll go ahead
and open a new code cell and type from simp x is equal to symbol equals x + 2 + simp x is equal to symbol equals x + 2 + x + 3 followed by expression. Now when
we go ahead and run this as you can see the output is 2x + 5. Now simp Let's go ahead and look at simplification. Consider this particular expression which is expression equ= x ^
expression which is expression equ= x ^ of 2 -1 by x -1 followed by the word expression again when we run this so simp can this mathematical relationship
simp can this mathematical relationship let's go ahead and use from simpl let's go ahead and use from simpl expression equalsy expression code simplify this mathematical relationship. So this means
that simply identify the mathematical relationship and reduce expression into a simpler form. Now let's go ahead and see the expansion. Let's say we have the expression. So let's say this is our expression and if we execute this
particular set, this is the output we get. So instead of manually multiplying the terms, simply can expand it. So let's use from simp import import expand let's use from simp import import expand expanded expression equals expand
expanded expression equals expand expression expanded expression. So when we go ahead and run this. So this is the output we get. So simp has automatically performed the multiplication. Now let's go ahead and perform the opposite
operation which is factorization. Starting with the same expression we can Starting with the same expression we can factor it using from simply import factor it using from simply import factor factor expression. So when we go
ahead and run this yeah from the output you can see this. So simply can move in expressions and it can also factor them back into simpler components. Now this
large mathematical formulas because simple transformations automatically. Now that we understand expressions, let's move to one of the most common mathematical tasks which is solving equations. So now that we have learned
how to create and manipulate mathematical expressions, let's move on to one of the most useful features of simp which is solving equations. In mathematics, solving an equation means finding the value of an unknown variable
that satisfies a given condition. Say for example, if we have x + 5 is equal to 10. So we want to find the value of x. Normally we solve this manually by moving numbers from one side to another. But when equations become complex with
multiple variables or higher degree expressions, solving them manually becomes timeconuming. Simply provides a built-in solving capability that allows Python to find these solutions symbolically. Let's start with a simple
example. First import the required functions which is from simp import functions which is from simp import import symbol solve. So here we are importing symbols to create mathematical variables and solve to find solutions
for equations. Now let's go ahead and create our variable. So we have x= symbols. Now let's go ahead and create a simple equation. And for this example we simple equation. And for this example we will solve x + 5 = 10. And in simple x +
will solve x + 5 = 10. And in simple x + 5 is equal to 10 as equation = x + 5 - 10. So the reason why we write it as this is because simply solves equations
by finding values where the expression becomes zero. Now let's go ahead and solve the function. So let's go ahead and type solution equals equation, x followed by solution. When you go ahead and run this, yeah, we get this as
the output. So this means that simply found that the value of x is five. Now let's go ahead and solve a slightly more advanced equation. Consider the equation advanced equation. Consider the equation x² - 4 = 0. Now this equation has two
x² - 4 = 0. Now this equation has two possible solutions. x = 2 and x = -2. Now let's go ahead and see how simples this. For that we type equation equals x
followed by two stars on the top and minus 4 and then solution equals solve minus 4 and then solution equals solve equation comma x followed by the word
solution. Now when we go ahead and run this the output will be as shown on the screen. Now simply returns both possible values because both satisfy the equation. Now let's go ahead and move to solving equations with multiple
variables. Many real world mathematical problems involve more than one unknown problems involve more than one unknown value. Let's say for example x + y = 10 or x - y = 10. Here in these cases we need to find both x and y. So let's go
ahead and create two symbols. We're doing that in the following way. x y equals symbol within brackets you write both variable. Now go ahead and create both variable. Now go ahead and create both equations. Follow that up by typing
both equations. Follow that up by typing equation = x + y - 10, x - y - 2. Now equation = x + y - 10, x - y - 2. Now these represent x + y = 10 as well as x
- y = 2. Now let's go ahead and solve them. Next you type solution equals them. Next you type solution equals solve equations, comma within brackets both the variable name. end that with the word solution. With that being done,
when you run this cell, the output will be sorry, there was a syntax error over here. Make sure that you add your commas between X and Y. Let's go ahead and run this output again. I made some changes within this. On running the cell, we get
this as the output. Now, this tells us one thing, which is x= 6 and y= 4. So, simp has solved the complete system of equations and returned the values for both variables. Now let's have a look at the practical scenario. Imagine an
engineer has a formula. Let's say distance equals speed into time. But the computation, we can rearrange the equation and solve for the required variable. Instead of manually performing calculations every time now, this is
where symbolic equation becomes so powerful. Instead of solving only one numerical problem, we create reusable mathematical models. Now let's go ahead and see another useful feature which is solving equations with conditions. Let's
solving equations with conditions. Let's say for example we have x ^ 2 + 5x + 6 = 0. Now let's go ahead and solve this equation. You will have to type equation
equation. You will have to type equation = x² + 5. Separate 5 and x with a star = x² + 5. Separate 5 and x with a star on top plus 6. Then we type solution on top plus 6. Then we type solution equals solve equation comma x followed
by solution. Now when we run this the output will be shown as it's here in the screen. So simply has identified the roots of the polomial equation. So far we have seen how simp can solve simple equations, polomial equations, multiple
variable equations and so on. This ability is extremely useful in algebra engineering calculations, physics formulas and mathematical modeling. So expressions and solve equations, let's
mathematical functions. A function represents a relationship between an input and an output. For example, we have this expression. So here the value of function changes depending on the value of x. So instead of calculating
represent the complete mathematical relationship. Now let's go ahead and start by creating a function expression. So go ahead and type from simp import So go ahead and type from simp import import symbol followed by x equals
import symbol followed by x equals symbols followed by x with an inverted symbols followed by x with an inverted comma and function equals x² + 5 2x + 6.
Let me just go ahead and change the numbers here. 3x and 5 followed by function. When we go ahead and run this cell, we get the output as x^2 + 3x + 5.
So now our function is stored symbolically. The advantage is that we whenever required. Say for example, let's find the value when x equals 2. Here we can substitute the value using the subs function. Go ahead and continue
the subs function. Go ahead and continue this. Type result equals function this. Type result equals function dot subs within brackets x comma 2 and result. Once we run this, we get the output as 15. Now, simply replaced x
with 2 and calculated the final value. Let's go ahead and try another value. Continue within the same cell and type function function dot subs within brackets x, n. When we
go ahead and execute the cell, we got the output as 135. Now the same function can now be evaluated for multiple inputs without recreating the formula. Now this approach is useful because many scientific and engineering problems are
based on mathematical functions. Instead of creating separate calculations for every input, we can create one symbolic function and analyze how it behaves. In the next section, we will explore one of the most powerful areas of simp which is
calculation operations including derivatives, integrals and limits. So functions and work with mathematical expressions, let's go ahead and explore one of the most important areas of mathematics supported by simp calculus.
Calculus helps us understand how things change and how quantities accumulate over time. In simple major calculus operations such as differentiation, integration, limits, and instead of manually solving lengthy mathematical
calculations, simps us to represent these concepts and compute results using Python. Let's go ahead and start with differentiation. A derivative tells us for example, if we have a function representing distance over time, the
velocity. Similarly, in machine learning, derivatives help calculate how a model should adjust to reduce errors. Let's go ahead and take a simple function. So, in order to find the derivative of this particular function,
we use the diff function. First, import the required functions. So, let's go the required functions. So, let's go ahead and do that from simp import symbols followed by diff. Now, let's go ahead and create our symbolic variable.
ahead and create our symbolic variable. So go ahead and type x equals symbol followed by x within inverted commas. Now let's go ahead and create the Now let's go ahead and create the function. So we have function equ= x ^ 3
function. So we have function equ= x ^ 3 + 2 into x ^ of 2 + 5 into x. End this with function. When we go ahead and execute this cell, the output will show
x cub + 2x 2 + 5x. Now let's go ahead and calculate the derivative. For that we use this expression. Move back to cell and type derivative equals diff
cell and type derivative equals diff function that is and uh function comma x function that is and uh function comma x followed by der. When we run this the followed by der. When we run this the output will be 3x² + 4x + 5 as shown
over here on the screen. So simp has automatically calculated the rate of change of this function. We can also calculate higher order derivatives. Let's say for example the second derivative. Let's execute this in a new
derivative. Let's execute this in a new cell. We have second derivative equals cell. We have second derivative equals function comma x followed by second derivative. When we go ahead and execute this, we get the output as 6x + 4. In
other words, it can also be shown as 2 into 3x + 2. So the third argument tells differentiate that function. And this is useful when analyzing acceleration, optimization problems, and mathematical models. Now let's move on to
integration. Integration is the opposite of differentiation. While derivatives help us understand the rate of change, integration helps us calculate accumulation. Now a common example is finding the area under a curve. Let's go
ahead and use a simple function. Let's take this function for example. So first we import the integration function. Let's go ahead and do that. So that's from simp import import integrate. Now create the function x ^2. Let's go ahead
and calculate the indefinite integral. So let's go ahead and create the function first. So we have function equals x ^ 2. Moving on to the indefinite integral part. We have integral equals integrate function x
followed by integ. When we go ahead and execute this, we get the output as xq by 3 as shown on screen. So now simply has found the mathematical expression that represents the accumulated value of the function. Now let's go ahead and
calculate a definite integral. Now definite integral calculates the value between two limits. Say for example finding the area under the curve from 0 finding the area under the curve from 0 to 5. So we have definite integral
to 5. So we have definite integral equals integrate comma x comma 0 comma 5. We'll put this within brackets. Then we have definite integ. Make sure you
have your underscore put in. Let's go ahead and execute this. As you can see we've got the output as 125x3. Now this represents the total accumulated area between the given limits. Now the third important calculus operation is limits.
A limit helps us understand what happens to a function when a value approaches a particular point. Say for example what happens when x gets closer to one. Let's take this function for example. So we have taken the following function.
Mathematically this expression becomes undefined when x= 1. But we can study what happens as x approaches 1. First import the limit function. So let's go import the limit function. So let's go ahead and do that. we have from simple
import limit. Now let's go ahead and create the expression. So we have create the expression. So we have expression equals x ^ 2 - 1 / x - 1. Now
let's go ahead and calculate the limit for which we have result equals limit for which we have result equals limit expression comma x comma 1. With that expression comma x comma 1. With that being done, go ahead and type. On
executing this cell, we get the output as two. Now, simply understands that although the original expression is undefined at x= 1, the value approaches two when x gets closer to that point. Simpai can also help us understand
mathematical behavior visually. Let's say for example, instead of seeing the derivative result, we can visualize the original function and understand how the curve changes. A graph can help us see increasing and decreasing patterns,
maximum and minimum points, behavior on your specific values and so on. Now this connection between formulas and visual understanding makes calculus much easy to explore. So, so far we have explored how simples algebra, equations,
capabilities are extremely useful when working with mathematical models. Now let's move on to another important area of Simpai which is matrices and linear algebra. So matrices are mainly used in technical fields including engineering,
computer graphics, machine learning and scientific computing. Now a matrix is a structured collection of numbers arranged in rows and columns. Simply allows us to create and perform mathematical operations on matrices
symbolically. Let's go ahead and create our first matrix. Open your new code our first matrix. Open your new code cell and type from simply import matrix. cell and type from simply import matrix. Then go ahead and type a equals matrix
Then go ahead and type a equals matrix within brackets. We have 1a 2 and 1 2 within brackets. We have 1a 2 and 1 2 and then we have 3a 4 followed by a when we go ahead and execute this we're getting an error. Let's see where we
went wrong. Sorry the expression was supposed to look like this. Now let's go ahead and execute this again. So as you can see the output will display a matrix can see the output will display a matrix with the numbers 1 2 3 and four arranged
in the order as you can see on the screen. Now simp understands this as a mathematical matrix object. Now let's go ahead and perform basic operations. First let's find the determinant. Now the determinant is a value that provides
important information about a matrix. So let's go ahead and execute the next part let's go ahead and execute the next part of the code in the cell. So we have of the code in the cell. So we have determinant equals a dot this is the
debt function followed by determinant. So on executing this we get the output as minus2. Now let's go ahead and calculate the inverse of the matrix. Now the inverse is useful in solving many mathematical problems. So in order to
mathematical problems. So in order to execute inverse type inverse equals a dot inv which is the function in order to find the inverse followed by inverse.
to find the inverse followed by inverse. Now upon running this we get the inverse of the matrix which has been solved using the simp library. Now matrices are a major part of modern technology. They are used in machine learning,
engineering systems, and scientific simulations. Simp allows us to explore these mathematical operations directly using Python. Now that we have covered matrices, let's move on to visualizing
mathematical functions using simp plotting. So now that we have explored how simple mathematical calculations, solve equations, handle calculus, and work with matrices. Let's try to understand how we can visualize
mathematical relationships. Sometimes looking only at formulas and numerical results is not enough. A graph helps us understand how a function behaves, how a value changes, and what patterns exists. Now, Simpai provides plotting
capabilities that allow us to quickly visualize mathematical expressions directly from Python. Let's go ahead and start by creating a simple mathematical function. Say for example, we have this expression. Now this function represents
a curve where the value of y changes based on the value of x. First let's import the required functions. So let's go ahead and do that first. So we have go ahead and do that first. So we have import si from simp import import
import si from simp import import symbols and then we have from si dot symbols and then we have from si dot plotting import plot. So here symbols allow us to create mathematical variables. Plot allows us to visualize
mathematical expressions. Now let's go ahead and create a symbolic variable which is x equals symbol. So now we can go ahead and create our mathematical go ahead and create our mathematical expression which is function=
x to the^ of 2. Then we type function. So upon executing this we will get this. What a syntax error over here. When we go ahead and execute this why is this not coming? Okay. So the error was that
import plot should have been on the same line as from simply do.plotting. Now let's go ahead and execute this. So now the output will display as x². Now let's visualize this function. For that you need to go ahead and type plot within
brackets function. Now when we go ahead and execute this simply will generate a graph of the function and the graph will show a parabolic curve representing y = x². Now this visualization helps us understand how the value of y increases
as x increases. Now let's explore a slightly more complex function. Consider the function y= sinx. Now this represents a wavelike mathematical relationship. So let's consider this function. So we have from simp
function. So we have from simp followed by function equals sin x then we plot function. So when we go ahead and execute this again I made the same
arrow. Let's go ahead and add these on the same line. Now let's go ahead and execute the cell. So the output will display a sine wave. Now this type of visualization is useful in understanding periodic behavior oscillations and
scientific patterns. Simpi also allows us to control the range of values that example instead of plotting all possible values we can define a specific range. Let me go ahead and show that plot function comma x comma - 10 comma 10. So
over here x is the variable that we are plotting and minus 10 is the starting value and 10 is the ending value upon running this. Yeah. So the graph will now display the function only within this range. Now let's go ahead and
reconnect this with a real world example. Imagine that we're analyzing a mathematical model that describes motion. A formula can tell us a relationship between time and distance. But a graph allows us to immediately
understand when the object is moving faster or when the rate changes and how the overall pattern behaves. This is why visualization is an important part of mathematical analysis. Simpai helps us move from mathematical expression to
symbolic calculation and to visual understanding. So now that we have seen how simp can represent and visualize mathematical functions, let's move into some of the advanced capabilities and explore how Simpai supports additional
mathematical domains. So far we have worked with the most commonly used simp capabilities which is expressions, equations, calculus, matrices, plotting and so on. However, simps many other mathematical areas that are useful for
specialized applications. Let's go ahead and explore some of these features. Now differential equations describe relationships involving changes. They are widely used in physics, engineering, mathematical modeling and so on. For
example, a system where the rate of change depends on the current state can be represented using a differential equation. Simp provides tools to represent and solve these equations. Let's look at a simple example. First
import the required functions. Go ahead and type from simple import function and type from simple import function solve and eq. So here functions allow us to define an unknown mathematical functions. Dissolve is used to solve
differential equations and eq represents an equation. Now let's go ahead and an equation. Now let's go ahead and define a function. y equals function followed by y. Now let's go ahead and create a simple differential equation.
create a simple differential equation. So we have x equals symbols within So we have x equals symbols within brackets we have x followed by equation brackets we have x followed by equation equals eq dot we use the diff function
equals eq dot we use the diff function comma y within brackets we have x. Now this represents dy by dx= y. Now let's go ahead and solve it. So in order to go ahead and solve it. So in order to solve it we have solution equals
solve it we have solution equals dissolve equation and solution. Now the output should be providing the mathematical solution and here we have the result. So this shows how simp can work with more advanced mathematical
problems. Simp also provides support for physics related calculations. Say for example we can represent physical quantities and perform symbolic calculations. Common areas include mechanics, quantum physics, units and
instead of manually rearranging formulas, we can allow Simpai to handle mathematical relationships. Senpai can also work with probability and statistics concepts. Examples include
probability calculations, statistical expressions, and mathematical distributions. Now, this can be useful when exploring mathematical concepts behind data analysis. Simp also includes tools for representing geometric
objects, say for example, points, lines, and circles. So instead of only calculating numbers, simp allows us to describe mathematical objects and analyze their properties. We have now explored the practical capabilities of
expressions to advanced mathematical operations. The next important step is to understand where these capabilities are applied in the real world scenarios and why senpai is valuable beyond learning mathematics. So now that we
have explored how simp works practically from creating expressions to solving equations and performing advanced mathematical operations. Let's go ahead and understand these capabilities and why they're actually useful. The real
value of simp is not just performing mathematical calculations. It helps professionals and researchers work with mathematical relationships, analyze calculations. Let's have a look at some practical applications. One of the major
areas where symbolic mathematics is useful is engineering. Engineers often work with mathematical models before creating real world systems. Say for example, an engineer designing a mechanical system may need to analyze
relationships between force, motion, energy, speed, acceleration. So instead of manually rearranging formulas every time, symbolic computation allows understand how different variables affect the system. Let's see a simple
example. Imagine we have the equation for distance which is distance equals speed into time. As you know the formula for that is distance equals speed into time. So in a real scenario we know different values and we may need to
solve for an unknown value. Simpi allows us to represent this relationship symbolically. So let's go ahead and create this equation. Go ahead and type create this equation. Go ahead and type from simp import import symbols comma
solve. Now let's add our expression which is distance comma speed comma time equals symbol within brackets we type distance speed and time followed by
distance speed and time followed by equation equals distance minus speed equation equals distance minus speed into time followed by equation. So here we have created a symbolic relationship between distance, speed and time. Now
suppose we want to find speed. We can rearrange the equation using simp. So in order to do that, let's go ahead and type solve equation, speed. Let's go ahead and execute this. Let's go first and correct any errors
Let's go first and correct any errors within this code. Yeah, upon executing you get the output as distance by time. Now this simply means that simp has rearranged the formula and solved for speed in engineering. This ability helps
professionals analyze formulas without manually performing every rearrangement. Physics applications. So using simplication around mathematical relationships that describe how the real world behaves. Say
for example motion equations, energy calculations and force relationships along with wave equations. Let's have a look at a simple physics example. The equation for kinetic energy will be as follows. As you can see, it's half into
mass into velocity square. So instead of calculating only one value, we can represent this relationship symbolically. Let's create this formula. symbolically. Let's create this formula. It's from simp import import symbols
It's from simp import import symbols velocity equals symbols within brackets we have mass comma velocity again. Then we write the formula which is kinetic we write the formula which is kinetic energy energy equals half into mass into
energy energy equals half into mass into velocity into 2 followed by kinetic energy. Now the output will show 0.5 into mass into velocity. So now we can substitute the actual values. Let's say for example mass is equal to 10,
velocity equals 5 something like that. So let's go ahead and type kinetic energy and we use the function called subs over here. Within subs we have let's take the input for mass as 10 and the velocity
the velocity as um five. Let's go ahead and run this. Now the output as you can see is 125. So simply calculated the kinetic energy approach is useful because the same formula can be reused with different
values. Now let's have a look at another important application area which is machine learning. Many machine learning algorithms rely heavily on mathematics concepts such as optimization, gradients, functions, and matrix
operations. They are all based on mathematical calculations. Let's say for learning model, we often need to understand how a function changes. This involves derivatives. Let's have a look at a simple function. So as you can see,
I've taken this function. We can calculate its derivative using simply in the following way. Let me show you. So we just have to do from simply import symbols and use the diff function followed by take x as a variable which
is equals symbols and then within brackets we have the variable x. Then we brackets we have the variable x. Then we have function equals x ^ 2 + 3 to the^
of x. This is followed by the diff function again within brackets we have function again within brackets we have function comma x. Upon running this we get the output as 2x + 3. Now this mathematical operation is the foundation
behind many optimization techniques used in machine learning. So simp is often mathematical concepts before implementing them in larger machine learning systems. Simpai is also widely useful in education and research. For
students, Senpai helps make mathematics interactive. Instead of only solving problems on paper, students can experiment with formulas and immediately see how it changes variable effects and immediately see how changing variables
affect results. For researchers, symbolic computation helps in testing mathematical relationships, deriving formulas, simplifying complex expressions. Let's say for example a researcher can create a mathematical
and analyze the result before moving towards a real world experiment. Let me go ahead and show you a mini practical scenario. So let's combine what we have learned and imagine that we're analyzing
a simple motion model. The relationship is as simple as position equals velocity into time. So we can create a symbolic model in the following way. So just go ahead and type from simp velocity and
time which is equal to symbols again within brackets we have velocity as well as time and then we have positions equals velocity into time followed by
pos. So when we go ahead and run this one second there's an error. Okay it's not positions it's position. Let's go ahead and run this. Yeah, as you can see the output is velocity into time. Now we have a reusable mathematical model. We
rewriting the formula. Let's say for example, if we go ahead and type position dot and within brackets, we have velocity 20 and time is five. If we go ahead and
run this, we can expect the output to be 100. Yeah. So this simple example represents the same workflow used in large scientific and engineering problems which is create a mathematical relationship present it symbolically
analyze or calculate results and finally apply it to a real scenario. So through these examples we can see that simp is not just a mathematical calculator. It's mathematical ideas into programmable models. From engineering equations to
physics calculations and machine learning concepts, symbolic computation provides a powerful way to explore mathematics. Let's go ahead and finish how these practical skills connect together. In this course, we explored
how simplic mathematics into Python ecosystem. We started by understanding mathematical symbols and expressions instead of only fixed numerical values.
We then learned how to create symbols, build mathematical expressions, simplify formulas, expand and factor expressions, and solve different types of equations. mathematical capabilities such as functions, calculus operations like
derivatives, integrals, and limits along with matrices and mathematical visualization. We also looked at how simp can be applied in real world areas like engineering, physics, research, and mathematical learning where symbolic
computation helps analyze and automate complex mathematical problems. By combining mathematics with programming, simps us to explore, manipulate, and solve problems more efficiently. With this foundation, you are now ready to
use Simpai for practical mathematical applications and continue building more enjoyed watching this video, make sure to hit that subscribe button and subscribe to SimplyLearn for more such insights.
