MATLAB Answers

How to make MATLAB find all roots of the equation?

23 views (last 30 days)
Oytun KOLTUK
Oytun KOLTUK on 2 Dec 2020
Answered: Amrtanshu Raj on 24 Dec 2020
For example, for given equation below, MATLAB checks 2 condition in order to find the 4 different roots.
((x^2)-(7*x)+11)^((x^2)-(13*x)+42)==1
1. Base must be 1
2. Exponent must be 0
But there is one more condition that the exponent can be 2n (even) when base equals (-1) which brings 2 more roots.
So what i want to learn is How can i force MATLAB to checks all conditions and shows each root of the given equation. (Not a condition spesific methods but a global feature that allow MATLAB to consider every condition to get results of all roots).
Btw, solve function returns just first root which 2 in this equation normally. When we force MATLAB to return all the roots, it results 3 more roots which are 5, 6, 7 when 'IgnoreAnalyticConstraints' feature of the solve function is used.

  0 Comments

Sign in to comment.

Answers (1)

Amrtanshu Raj
Amrtanshu Raj on 24 Dec 2020
Hi,
There is currently no method to include the required condition in the solve function to get the roots. I have brought this to the notice of the developers and may be considered for a future release.
Thanks

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!