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

Implementation of binary search, Implementation of binary search: The ...

Implementation of binary search: The binary search can be implemented as a recursive function. The recursive function below also implements this binary search algorithm. It re

Patch function - graphics objects, Patch function - graphics objects: ...

Patch function - graphics objects: The patch function is used to generate a patch graphics object, which is made from 2-dimensional polygons. The patch is defined by its verti

Finding a sting - function findstr, Finding a sting - function findstr: ...

Finding a sting - function findstr: The function findstr receives two strings as input arguments. It finds all the occurrences of shorter string contained by the longer, and r

Structures, Structures: The Structures are data structures which group...

Structures: The Structures are data structures which group together values which are logically related in what are known as the fields of structure. The benefit of structures

Function numden, function numden: The function numden will return indi...

function numden: The function numden will return individually the numerator & denominator of a symbolic expression: >> sym(1/3 + 1/2) ans = 5/6 >> [n, d] =

Execute a exponential function program, Execute a exponential function prog...

Execute a exponential function program: Running the script will take up the menu as shown in the figure: Then, what happens will totally depend on which button(s) the

Dot product of matrix, Dot Product: The dot or inner product of two ve...

Dot Product: The dot or inner product of two vectors a and b is written as a • b and is defined as  In another words, this is like matrix multiplication when multiplyi

Related structure functions, Related Structure Functions: There are ma...

Related Structure Functions: There are many functions which can be used with structures in a MATLAB. The function isstruct will return 1 for logical true when the variable arg

Indexing into vectors of structures, Indexing into Vectors of structures: ...

Indexing into Vectors of structures: Frequently, when the data structure is a vector of structures, it is essential to iterate through the vector in order by various fields. F

Displaying expressions, Displaying expressions: The good-looking funct...

Displaying expressions: The good-looking function will show such expressions by using exponents; for illustration, >> b = sym('x^2') b = x^2 >> pretty(b)

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