Effacer les filtres
Effacer les filtres

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 vues (au cours des 30 derniers jours)
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

Réponse acceptée

Ahmed A. Selman
Ahmed A. Selman le 12 Avr 2013
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.

Plus de réponses (1)

Ahmed A. Selman
Ahmed A. Selman le 12 Avr 2013
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 commentaire
Walter Roberson
Walter Roberson le 12 Avr 2013
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.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by