solving transcendental equation numerically
조회 수: 24 (최근 30일)
이전 댓글 표시
I am trying to solve the 2 transcendental equations for 2 variables A,M for the given L
PBAR = 0;
L = [0.1,0.5,1.0,1.5,2.0];
equation1 = A^3 - L*A^2.*(sqrt(M.^2-1) + M.^2.*acos(1./M)) - PBAR;
equation2 = L*A^2/2*(sqrt(M^2-1) + (M^2-2)*acos(1/M)) + 4*L^2*A/3*(sqrt(M^2-1)*acos(1/M)-M+1)-1;
can any one help me how to solve it numerically
댓글 수: 0
답변 (2개)
Mischa Kim
2014년 1월 16일
편집: Mischa Kim
2014년 1월 16일
Hello vijay, what are the equations equal to? Zero? In other words,
0 = A^3 - L*A^2.*(sqrt(M.^2 - 1) + M.^2.*acos(1./M)) - PBAR;
0 = L*A^2/2*(sqrt(M^2 - 1) + (M^2 - 2)*acos(1/M)) + 4*L^2*A/3*(sqrt(M^2 - 1)*acos(1/M) - M+1)-1;
If so, this is a root-finding problem: find A and M such that the two equations are satisfied. There is plenty of literature on solving systems of non-linear equations.
Try Newton-Raphson. The challenge you might run into is to find good starting values for the search, such that the algorithm coverges properly. Also be aware that there could be multiple soulutions to your problem.
댓글 수: 0
Azzi Abdelmalek
2014년 1월 16일
M=sym('M',[1,5])
A=sym('A',[1 5])
PBAR = 0;
L = [0.1,0.5,1.0,1.5,2.0];
equation1 = A.^3 - L.*A^.2.*(sqrt(M.^2-1) + M.^2.*acos(1./M)) - PBAR;
equation2 = L.*A.^2/2.*(sqrt(M.^2-1) + (M^.2-2).*acos(1./M)) + 4*L.^2.*A/3.*(sqrt(M.^2-1).*acos(1./M)-M+1)-1;
solve([equation1;equation2])
댓글 수: 4
Azzi Abdelmalek
2014년 1월 16일
syms A M
PBAR = 0;
L = [0.1,0.5,1.0,1.5,2.0];
for k=1:numel(L)
equation1 = A.^3 - L(k).*A^.2.*(sqrt(M.^2-1) + M.^2.*acos(1./M)) - PBAR;
equation2 = L(k).*A.^2/2.*(sqrt(M.^2-1) + (M^.2-2).*acos(1./M)) + 4*L(k).^2.*A/3.*(sqrt(M.^2-1).*acos(1./M)-M+1)-1;
sol=solve([equation1;equation2]);
M1(k,1)=sol.M
A1(k,1)=sol.A
end
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!