Solve a variable in equation

3 次查看(过去 30 天)
Rafael Zanetti
Rafael Zanetti 2020-11-9
Hi everyone,
I have an equation (function) wich I need solve the lambda value:
f_lambda1 = 101*(1.2-40.40*lambda1).^2 - 200*(1.2-40.40*lambda1)*(1-880*lambda1).^2 - 2*(1.2-40.40*lambda1) + 100*(1-880*lambda1).^4 + 1 == 0;
So I tried to isolate lambda trough the command "x = isolate(f_lambda1, lambda1)" with out success, someone can help me about that solution?
I Thank You

回答(1 个)

John D'Errico
John D'Errico 2020-11-9
Just use solve. Or vpasolve will also suffice, since this is a polynomial, vpasolve will give all solutions.
lamb = solve(f_lambda1,'maxdegree',4)
Of course, that produces a lengthy, unreadable mess. If you want "the" lambda value, then use vpa on that.
vpa(lamb)
ans =
- 0.00011080430165098438873831754345607 + 0.000010811919008810757147508304534553i
- 0.00011080430165098438873831754345607 - 0.000010811919008810757147508304534553i
0.0023313621528906538102259208492412 + 0.0000055949768600504265689959078403377i
0.0023313621528906538102259208492412 - 0.0000055949768600504265689959078403377i
Where we see 4 solutions and only 4. Since your problem is a quartic polynomial in lambda1, those are all the solutions. I have no idea which one you think is correct.

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by