# Finding the roots for an equation

11 views (last 30 days)
Cem Eren Aslan on 2 Nov 2023
Commented: Torsten on 2 Nov 2023
Hi everyone,
I try to solve an equation. Coefficient of this equations depends another variable like 'a' and i want to find the roots depend on 'a'. For example, i have an equation like "x^4+5*a*x^2+6*a=0" and i want to find the roots like x1=0.122a etc. How can i do that?
Thanks
Cem
##### 0 CommentsShow -2 older commentsHide -2 older comments

Sign in to comment.

### Accepted Answer

KSSV on 2 Nov 2023
syms x a
eqn = x^4+5*a*x^2+6*a==0 ;
s = solve(eqn,x)
s =
##### 4 CommentsShow 2 older commentsHide 2 older comments
Cem Eren Aslan on 2 Nov 2023
I get these results.
Torsten on 2 Nov 2023
syms x a
eqn = x^3+5*a*x^2-6*a*a*x+a^3==0 ;
s = solve(eqn,x,'MaxDegree',3)
s =

Sign in to comment.

### Categories

Find more on Conversion Between Symbolic and Numeric in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!