MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayTo resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Asked by Mirza on 12 Jan 2013

I am facing problem to find the values of unknown parameters from the non-linear equations. Kindly suggest me how to i get the solution by using MATLAB. The equations are like as a+ab+10a+a^5=100 b+b^3a^(1.5)+ab=200 Now i want to find the value of a and b

*No products are associated with this question.*

Answer by Azzi Abdelmalek on 12 Jan 2013

Edited by Azzi Abdelmalek on 12 Jan 2013

Use **fsolve** function

Answer by Roger Stafford on 12 Jan 2013

Azzi has given you a good solution. However, these two equations have a great many solutions, many of them complex, and to find all of them using 'fsolve' requires starting it with many different initial estimates and also providing for complex numbers. An alternative method in the case of equations like those you give lies in eliminating one of the variables and obtaining a polynomial equation to be solved. Then one can use matlab's 'roots' function to find all its solutions. The reasoning can proceed along lines such as the following.

Define c = a^(0.5) which gives these equations:

c^2*b+11*c^2+c^10 = 100 b*(1+c^2)+b^3*c^3 = 200

Now solve for b in the first equation in terms of c and then substitute this expression in place of b in the second equation:

b = (100-11*c^2-c^10)/c^2 ((100-11*c^2-c^10)/c^2)*(1+c^2)+((100-11*c^2-c^10)/c^2)^3*c^3 = 200

Now multiply both sides of this latter equation by c^3 to clear out the denominators, collect all different powers of c, and thus obtain a polynomial equation in c. As you see, it is a thirtieth degree polynomial so you will get thirty roots. For each one the substitutions

a = c^2 b = (100-11*c^2-c^10)/c^2

will give you the corresponding solutions to the original equations. The symbolic toolbox has routines that can make the above algebraic manipulations easier. Note that the validity of the solutions will depend in each case on an appropriate proper interpretation of a^(1.5).

## 0 Comments