Clear Filters
Clear Filters

I have complex equation of the form x=(y/c1)+K*(y/c1)^n ??

1 view (last 30 days)
I have complex equation of the form x=(y/c1)+K*(y/c1)^n ?? where c1, K, n are constants. The typical values are 90e9, 5e12 and 6.1245. i need to obtain y for a x and i need to obtain it for a range of values.
  1 Comment
James Tursa
James Tursa on 8 Apr 2016
"... i need to obtain y for a x ..."
Do you mean you are trying to solve the equation for y when you are given a value of x? And you want to do this for a range of x values?

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 8 Apr 2016
There is no analytic solution to that for n > 3. You will need to use numeric methods such as fzero()
  2 Comments
John D'Errico
John D'Errico on 8 Apr 2016
Actually, for n == 4, this would be solvable. The limit is n >= 5, or non-integer n that will be problematic.

Sign in to comment.


John D'Errico
John D'Errico on 8 Apr 2016
syms n y c1 K
E = x==(y/c1)+K*(y/c1)^n;
E0 = subs(E,{c1,K,n},{90e9, 5e12, 6.1245});
There will be multiple solutions. vpasolve finds them well enough, though fzero would also work.
vpasolve(E0(1))
ans =
685108721.21251019872317593852318
vpasolve(E0(2))
ans =
838327989.34904713260360139778459
vpasolve(E0(3))
ans =
- 727372205.91495288136399524186001 - 472855561.58678110600582657021201i
vpasolve(E0(4))
ans =
740586777.76325202886393577885394
...

Categories

Find more on Symbolic Math Toolbox 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!