EDUCBA

EDUCBA

MENUMENU
  • Blog
  • Free Courses
  • All Courses
  • All in One Bundle
  • Login
Home Data Science Data Science Tutorials Matlab Tutorial Simplify Matlab

Simplify Matlab

Priya Pedamkar
Article byPriya Pedamkar

Simplify Matlab

Introduction to Simplify Matlab

MATLAB is a programming environment that is interactive and is used in scientific computing. It is extensively used in a lot of technical fields where problem-solving, data analysis, algorithm development, and experimentation is required. The discipline-specific software is extensively written using MATLAB. In this topic, we are going to learn about Simplify Matlab.

MATLAB provides us with a lot of mathematical functions, useful in various computational problems. In this article, we will studytheMATLAB function used for simplification of expressions; ‘simplify’

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

As the name suggests, the Simplify function helps us in getting an algebraic expression in its simplest form. Though simplification is subjective, i.e. it could mean different to different users, the objective of a simplifying function is to put the expression in the best possible form.

An expression might look simplified to one user whereas the other might find it not that simplified.

Syntax of Simplify Matlab

Let us understand the Syntax of Simplify function in MATLAB

A = simplify (expression)

Description of Simplify Function in Matlab:

A = simplify (expression)

  • simplify (expression) function will perform the simplification of algebraic expression passed as an argument
  • If the expression is symbolic matrix or vector, simplify function will simplify every element of the expression

Examples of Simplify Matlab

Let us understand simplify (expression) with a couple of examples:

Example #1

First, let us take a simple algebraic expression as the input

Expression = (1 – x^2)/((1 - x)* (1 + x))

We know that 1 – x^2 in algebra gives (1 – x) * (1 + X)

So, our simplified output must be 1.

Syntax:

syms x[initializing x] simplify ((1 – x^2)/((1 - x) * (1 + x)))[passing the input expression]

Input:

syms x
simplify ((1 - x^2)/((1 - x) * (1 + x)))

Output:

Simplify Matlab output 1

As we can clearly see in the output, our algebraic expression is simplified, and the output is as expected by us, i.e. 1

Example #2

Let us now take another example with more complicated calculations and higher powers.

Expression = (1 – x^2) /((1 - x) * (1 + x)^4)

If we simplify this manually, the output will be 1/(x + 1)^3

Syntax:

syms x y[initializing x] simplify((1 – x^2) /((1 - x) * (1 + x)^4))[passing the input expression]

Input:

syms x y
simplify((1 - x^2) /((1 - x) * (1 + x)^4))

Output:

Simplify Matlab output 2

As we can see in the output, our algebraic expression is simplified, and the output is as expected by us,i.e1/(x + 1)^3.

Example #3

Next, let us take a trigonometric expression for simplification

Expression = (cos(x)^2 – sin(x)^2) * (x^2 - 1)

If we simplify this manually, the output will be cos(2*x)*(x^2 – 1)

Syntax:

syms x [initializing x] simplify((cos(x)^2 – sin(x)^2) * (1 – x^2))[passing the input expression]

Input:

syms x
simplify((cos(x)^2 - sin(x)^2) * (1 - x^2))

Output :

output 3.1

output 3.2

As we can clearly see in the output, our algebraic expression is simplified, and the output is as expected by us,i.ecos(2 * x) * (x ^ 2 – 1)

Example #4

Next, let us take an expression which has both trigonometric & algebraic expression

Expression = (sin(x)^2 + cos(x)^2)*(x^2 + x + 1)*(x^2 + 1)*(x^2 - x + 1) * (x^4 – x^2 + 1)

If we simplify this manually, the output will be x^10 + x^8 + x^6 + x^4 + x^2 + 1

Syntax:

syms x[initializing x] simplify((sin(x)^2 + cos(x)^2)*(x^2 + x + 1)*(x^2 + 1)*(x^2 - x + 1) * (x^4 – x^2 + 1))[passing the input expression]

Input:

syms x
simplify((sin(x)^2 + cos(x)^2)*(x^2 + x + 1)*(x^2 + 1)*(x^2 - x + 1) * (x^4 - x^2 + 1))

Output:

output 4.1

output 4.2

As we can see in the output, our algebraic expression is simplified, and the output is as expected by us, i.ex^10 + x^8 + x^6 + x^4 + x^2 + 1

Conclusion

So, in this article, we learned how the Simplify function works in MATLAB. We can use the simplified function to obtain the simplified version of expression passed in the input array.

Simplify function can be used on algebraic expressions and also on the trigonometric expressions.

Recommended Articles

This is a guide to Simplify Matlab. Here we discuss How the Simplify function works in MATLAB along with programming examples. You may also have a look at the following articles to learn more –

  1. Fzero Matlab
  2. Matlab Line Style
  3. Matlab Plot Circle
  4. Matlab stem()
SPSS Course Bundle - 14 Courses in 1 | 5 Mock Tests
34+ Hours of HD Videos
14 Courses
5 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
MICROSOFT AZURE Course Bundle - 15 Courses in 1 | 12 Mock Tests
63+ Hour of HD Videos
15 Courses
12 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
HADOOP Course Bundle - 32 Courses in 1 | 4 Mock Tests
125+ Hour of HD Videos
32 Courses
4 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
INFORMATICA Course Bundle - 7 Courses in 1
47+ Hours of HD Videos
7 Courses
Verifiable Certificate of Completion
Lifetime Access
4.5
Primary Sidebar
Popular Course in this category
MATLAB Course Bundle - 5 Courses in 1 | 3 Mock Tests
 11+ Hours of HD Videos
5 Courses
3 Mock Tests & Quizzes
  Verifiable Certificate of Completion
  Lifetime Access
4.5
Price

View Course
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more