solving nonlinear equations
Show older comments
Hello,
i tried to work on solving the following equations, so that the code returns values for w and theta. However this does not work in the desired way. I even tried to work with fminsearch. Does somebody know how to solve this problem?
syms w theta;
eq1 = '-0.0889=(-w^0.5*(w-1)^2*(w*(w+2)*sinh(3*theta)+3*sinh(theta)))/(sqrt(2)*(w-1)*(w*cosh(2*theta)+1)^1.5)';
eq2 = '7.2191 =(w^2*((w^4+2*w^+3*w^2-3)*cosh(4*theta)+4*(w+2)*cosh(2*theta))+3*(2*w+1))/(2*(w*cosh(2*theta)+1)^2)';
[w theta]=solve(eq1,eq2,w,theta)
thank you for your help.
Accepted Answer
More Answers (1)
Sean de Wolski
on 25 Apr 2012
The expressions do nto need to be strings:
syms w theta;
eq1 = 0.0889+(-w^0.5*(w-1)^2*(w*(w+2)*sinh(3*theta)+3*sinh(theta)))/(sqrt(2)*(w-1)*(w*cosh(2*theta)+1)^1.5); %=0
eq2 = -7.2191 +(w^2*((w^4+2*w^+3*w^2-3)*cosh(4*theta)+4*(w+2)*cosh(2*theta))+3*(2*w+1))/(2*(w*cosh(2*theta)+1)^2); %=0
[w theta]=solve(eq1,eq2,w,theta)
Categories
Find more on Numeric Solvers 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!