Exploring MATLAB's Function for Solving Non-Polynomial Equations

  • MATLAB
  • Thread starter chronicals
  • Start date
  • Tags
    Matlab Roots
In summary, to use MATLAB's function for solving non-polynomial equations, you need to first define the equation using the "syms" command and then use the "solve" function to find the solution(s). The function can handle any type of non-polynomial expression and can solve equations with multiple variables. There is no specific limit to the complexity of equations that can be solved, but the accuracy of the solution may vary based on the complexity and initial guess. Checking the solution by plugging it back into the original equation is always recommended.
  • #1
chronicals
36
0
I have a function : f (n)=40*n^1.5-875*n+35000;

How can i solve this equation with MATLAB. I know how to solve polynomial equation but this is different i think.
 
Physics news on Phys.org
  • #2
This is not a polynomial because your exponents are not all natural numbers.

Fortunately MATLAB doesn't have a problem with this and you can solve without much thought using the Symbolic Math Toolbox:

Code:
>> syms n
>> solve(40*n^1.5 - 875*n + 35000);
>> double(ans)
ans =
  1.0e+002 *
   3.8402 + 0.0000i
   0.6269 - 0.0000i
 

1. How do I use MATLAB's function for solving non-polynomial equations?

To use MATLAB's function for solving non-polynomial equations, you need to first define the equation using the "syms" command, which creates symbolic variables. Then, use the "solve" function, passing in the equation and the variable you want to solve for as arguments. The function will return the solution(s) to the equation.

2. What types of non-polynomial equations can be solved using this function?

The "solve" function in MATLAB can solve equations with any type of non-polynomial expression, such as trigonometric functions, exponential functions, and logarithmic functions. It can also solve systems of equations with both polynomial and non-polynomial terms.

3. Can I solve equations with multiple variables using this function?

Yes, the "solve" function in MATLAB can handle equations with multiple variables. You just need to specify which variable you want to solve for in the function call.

4. Is there a limit to the complexity of equations that can be solved using this function?

There is no specific limit to the complexity of equations that can be solved using the "solve" function in MATLAB. However, as the complexity increases, the computation time may also increase.

5. How do I know if the solution returned by the function is accurate?

The "solve" function in MATLAB uses numerical methods to find approximate solutions to equations. The accuracy of the solution depends on the complexity of the equation and the accuracy of the initial guess provided to the function. It is always a good idea to check the solution by plugging it back into the original equation to see if it satisfies the equation.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
742
  • Precalculus Mathematics Homework Help
Replies
14
Views
806
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
4K
Back
Top