필터 지우기
필터 지우기

I WANT TO SOLVE THE EQUATION for x: x*exp(x)=(a1-x)*a2*a3 . Here a1 and a3 are matrices and a2 is a constant. I cant solve the equation using solve

조회 수: 2 (최근 30일)
sigma=25;
k=8.61*10^(-5);
T=linspace(100,500);
E0=1.025;
Ea=E0+0.044;
t1=1;
t2=40;
a1=(sigma./(k.*T)).^2;
a2=(t1/t2);
a3=exp((Ea-E0)./(k.*T));
This is the code for the problem

채택된 답변

Ahmed A. Selman
Ahmed A. Selman 2013년 4월 12일
True, indeed.
Not only for (A,B) = (11,13) and (3,-6), but for a wide range of other set, including the given coefficients.. I got confused, and enthusiastic, with the closed-form solution.
Thanks Walter, I'm appreciated :)
@Dip Samajdar,
then, as a complement, please check the code below for your problem:
clc
clear
sigma=25;
k=8.61*10^(-5);
T=linspace(100,500);
E0=1.025;
Ea=E0+0.044;
t1=1;
t2=40;
a1=(sigma./(k.*T)).^2;
a2=(t1/t2);
a3=exp((Ea-E0)./(k.*T));
syms x
A=a1.*a2.*a3;
B=a2*a3;
for i=1:numel(A)
i
y=x*exp(x) - A(i) + B(i)*x;
OutPut1(i)=solve(y);
end
clc
disp('The solution is, in a matrix form, ');
OutPut=double(OutPut1)
This I've checked and it works alright, but it might take a minute or two to finish. Regards.

추가 답변 (1개)

Ahmed A. Selman
Ahmed A. Selman 2013년 4월 12일
The equation you wrote is
x*exp(x)=(a1-x)*a2*a3
y= x*exp(x)-(a1-x)*a2*a3
y= x*exp(x)-a1*a2*a3 +x*a2*a3
Let:
a1*a2*a3 = A
a2*a3 = B
then:
y= x*exp(x)-A + B*x
if the solution means finding the roots of (x) at which (y=0), then your equation has no mathematical solution, regardless the sizes of A and B.
There are two solutions, however,
1) when you put:
A = 0
y= x*exp(x) + B*x
with one certain solution at x = 0. The condition (A = 0), according to your input, implies that (a1=0), meaning (segma = 0).
2) when you put
B = 0
y= x*exp(x) + A
reducing directly to Lambert formula.
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 4월 12일
Let A=11, B=13, then x*exp(x) - A + B*x has a solution at approximately 0.7297101197 . There is no analytic solution, but that is not the same as saying there is no mathematical solution.
For A=3 and B about -6, there are two roots, one positive and one negative.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Equation Solving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by