How do I use muller method for solving multivariable equations?
Mostra commenti meno recenti
I have two equations of 2 variables. I tried using 'solve' but it keeps on calculating for hours together with no results. I would like to use Muller method as I have used it before and I can define start points and number of iterations. I can also check the residual value. Can anyone please suggest, how can I use Muller for solving multivariable equations?
2 Commenti
Alan Stevens
il 20 Ago 2020
Easier to do this if we know what your equations are.
Shreya Menon
il 23 Ago 2020
Risposte (1)
Alan Stevens
il 24 Ago 2020
Modificato: Alan Stevens
il 24 Ago 2020
I guess there are a few options.
- If you have the Opimisation toolbox, use fsolve.
- In your second equation replace V^2 + W^2 by, say, Rsq and solve for Rsq. Then express V as a function of W, knowing Rsq. Then use fzero to find W. The code structure might look something like the following (I'm unable to test it because I don't have your constants).
Rsq = ((2*(b+L*tand(alpha))/lambda0)^2)*(pi^2)*(mewr*epir-1)/k0a^2;
Vfn = @(W) sqrt(Rsq - W.^2);
W0 = ....; % Insert your initial guess
W = fzero(@Wfn, W0);
V = Vfn(W);
function WW = Wfn(W)
V = Vfn(W);
WW = (epir*(diff(besselj(1,V))/(V*k0a*besselj(1,V))) ...
-(diff(besselk(1,W))/(W*k0a*besselk(1,W))))*(mewr*(diff(besselj(1,V))/(V*k0a*besselj(1,V))) ...
-(diff(besselk(1,W))/(W*k0a*besselk(1,W))))-((V^2+W^2)*(V^2+mewr*epir*W^2))/(V^4*W^4*k0a^4);
end
3. An alternative to using fzero with option 2 is to program the Muller method yourself. However, I suspect fzero is the better option.
5 Commenti
Shreya Menon
il 25 Ago 2020
Alan Stevens
il 25 Ago 2020
You hadn't quite got Rsq right. It should be
Rsq=((2*(b+L*tand(alpha))/lambda0)^2)*(pi^2)*(mewr*epir-1)/k0a^2;
However, this doesn't help a lot! A reason for the error message could be that with the values for the constants you use it turns out that Rsq is a lot smaller than W^2 (about 0.001 compared with 1000^2). This results in a complex value for sqrt(Rsq - W^2).
Shreya Menon
il 26 Ago 2020
Alan Stevens
il 26 Ago 2020
Ah, fzero only deals with real numbers I'm afraid. I guess you need to look at the Optimisation toolbox.
Shreya Menon
il 26 Ago 2020
Categorie
Scopri di più su Polynomials in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!