Solving 2 × 2 systems of equations, MATLAB in Engineering

Assignment Help:

Solving 2 × 2 systems of equations:

However this may be easy in a MATLAB, in normal finding solutions to the systems of equations is not. The systems which are 2 × 2 are, though, fairly clear-cut, and there are many methods of solution for such systems for which the MATLAB has built-in functions.

Consider the 2×2 system of equations which is as shown below:

1031_Solving 2 × 2 systems of equations.png

At first, to visualize the solution, it will be simpler to change both the equations to equation of a straight line by writing each in the form y = mx + b (by altering x1 to x and x2 to y):

2130_Solving 2 × 2 systems of equations1.png

In MATLAB we can plot these lines by using a script; the answers are shown in figure.

778_Solving 2 × 2 systems of equations2.png

2016_Solving 2 × 2 systems of equations3.png

The intersection of the lines is the point (4, -1). In another words, x = 4 and y = -1. Altering back to x1 and x2, we hold x1 = 4 and x2 = -1. This permits us to visualize the solution.

This system of equations in a matrix form is as shown below:

1793_Solving 2 × 2 systems of equations4.png

We know that the solution is x = A-1 b, therefore we solve this when we can find the inverse of A. The one technique of finding the inverse for a 2 × 2 matrix includes computing the determinant D.

 

´ For a 2× 2matrix A=

719_Solving 2 × 2 systems of equations5.png

The determinant D is defined as follows:

 

1027_Solving 2 × 2 systems of equations6.png

It is written by using vertical lines around the coefficients of the matrix, and is defined as the product of the values on the diagonal minus the product of the other two numbers.

For a 2 × 2 matrix, the matrix inverse is defined in terms of D as shown below:

1377_Solving 2 × 2 systems of equations7.png


Related Discussions:- Solving 2 × 2 systems of equations

Storing strings in cell arrays, Storing Strings in Cell Arrays: The on...

Storing Strings in Cell Arrays: The one good application of a cell array is to store strings of various lengths. As cell arrays can store various types of values in the elemen

Symbolic variables and expressions, Symbolic Variables and expressions: ...

Symbolic Variables and expressions: The MATLAB has a type known as sym for the symbolic variables and expressions; these work with strings. The illustration, to generate a sym

Defined a variable in work space, Defined a variable in work space: Th...

Defined a variable in work space: The variables defined in the script will become a part of the workspace: >> clear >> who >> mysummfile    15 >> who

Example of image processing, Example of image processing: The other il...

Example of image processing: The other illustration generates a 5 × 5 matrix of arbitrary integers in the range from 1 to the number of colors; the resultant image is as shown

Illustration of if - else statement, Illustration of if - else statement: ...

Illustration of if - else statement: The one application of an if-else statement is to check for errors in the inputs to a script. For illustration, a former script prompted t

Num2str function - string, num2str function: The num2str function, tha...

num2str function: The num2str function, that converts real numbers, can be called in many ways. If only the real number is passed to the num2str function, it will generate a s

Replacing, Replacing, Finding, and separating strings: There are numer...

Replacing, Finding, and separating strings: There are numerous functions which find and replace the strings, or parts of strings, within the other strings and functions which

Example of menu driven modular program, Example of Menu driven modular prog...

Example of Menu driven modular program: As an illustration of such a menu-driven program, we will write a program to discover the constant e. The constant e, known as the n

Replacement - gauss-jordan elimination, Replacement : Replace a row b...

Replacement : Replace a row by adding it to (or subtract from it) a multiple of the other row. For a given row ri, this is written as   ri  - srj →  ri Note that when r

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd