I need an expression between two symbols R and a connected within a large order determinant.

2 visualizaciones (últimos 30 días)
I have computed this 18*18 matrix inwhich R and a are unknowns. I have to find the relation between R and a. since det(p)=0 is permissible in my problem i tried that but nothing was obtained even after 3 hours. Please do the needful to find relation between R and a by setting det of this matix equal to zero.
Is prod(diag(GaussElimination(M, ''))) function is releavent to my problem?
syms R a eta
tic
O=zeros(6);
Q=1;G=0.03;
xi=0.7;
eta=1;
Rb=10;
eta_array=1;
Lb=1;new=1;
for h=1:6
for k=1:6
syms z
A11(h,k)=int((1./xi).*sin(h*pi*z).*diff( sin(k*pi*z),z,2) - (a).^2.*sin(h*pi*z).*sin(k*pi*z),z,0,1) ;
B12(h,k)=int(R*(a).^2*sin(h*pi*z).*sin(k*pi*z),z,0,1);
A13(h,k)=-int((Rb./Lb).*(a).^2*sin(h*pi*z).*(Q.*cos(k*pi*z)+ (Q.^2./(k*pi)).*sin(k*pi*z)),z,0,1);
A21(h,k)=int(sin(h*pi*z).*sin(k*pi*z),z,0,1);
A22(h,k)=int(sin(h*pi*z).*diff( sin(k*pi*z),z,2) - eta.*(a).^2.*sin(h*pi*z).*sin(k*pi*z),z,0,1);
A31(h,k)=int(Q.*(new.*exp(Q.*z)).*((Q.*cos(h*pi*z)+ (Q.^2./(h*pi)).*sin(h*pi*z))).*(1+G.*((a).^2.* (Q.*cos(k*pi*z)+ (Q.^2./(k*pi)).*sin(k*pi*z)) -diff((Q.*cos(k*pi*z)+ (Q.^2./(k*pi)).*sin(k*pi*z)),z,2) ) ),z,0,1);
A33(h,k)=(1./Lb).*int((a).^2.*(Q.*cos(h*pi*z)+ (Q.^2./(h*pi)).*sin(h*pi*z)).*(Q.*cos(k*pi*z)+ (Q.^2./(k*pi)).*sin(k*pi*z)) +Q.*(Q.*cos(h*pi*z)+ (Q.^2./(h*pi)).*sin(h*pi*z)).*diff((Q.*cos(k*pi*z)+ (Q.^2./(k*pi)).*sin(k*pi*z)),z,1) -(Q.*cos(h*pi*z)+ (Q.^2./(h*pi)).*sin(h*pi*z)).*diff((Q.*cos(k*pi*z)+ (Q.^2./(k*pi)).*sin(k*pi*z)),z,2),z,0,1);
end
end
%p=double([A11,B12,A13;A21,A22,O;A31,O,A33]);
p=[A11,B12,A13;A21,A22,O;A31,O,A33]; %it will take 185 sec to get p.
toc
Time=toc
  3 comentarios
John D'Errico
John D'Errico el 3 de Ag. de 2022
Editada: John D'Errico el 3 de Ag. de 2022
Please don't use an answer to make a comment. I've moved your comment into a comment. Anyway, read my answer.
"@Sam Chak r u getting a relation between R and a when you ran it?
I am able to calculate p as a matrix having entries with R and a. Now i have to find its detminant that will become a nonlinear relation between R and a."

Iniciar sesión para comentar.

Respuestas (1)

John D'Errico
John D'Errico el 3 de Ag. de 2022
Editada: John D'Errico el 3 de Ag. de 2022
Sorry, but not going to happen. Ever. Why not? There are multiple reasons why this will fail, so you are tilting at impossibly huge windmills.
First, you have an 18x18 determinant, in which the unknowns appear nonlinearly. That 18x18 symbolic determinant is an incredibly huge task to compute. If we use minors to evaluate the determinant, we can deduce there will be factorial(18) terms.
factorial(18)
ans = 6.4024e+15
So 6.4 quadrillion terms. Each of those terms will be themselves be incredibly complicated, incredibly huge. Ok so maybe you have a big computer, the size of the earth. No problem. First, do you understand why the computation is taking so long? Just computing the matrix took 3 hours. I'm surprised even that part terminated. But then you want to compute the determinant. Sigh. Not gonna happen, purely from a computational perspective, at least not until that quantum chip from Starfleet Command arrives by UPS.
Ok, but then suppose the Borg do deliver that quantum CPU, you will so desperately need, and even assuming they do not manage to assimilate you, can you do the computation at all?
Remember that the determinant you so desire to compute is the equivalent now of a high order polynomial expression in the unknowns. And what do we know about polynomials of order 5 or above? Abel-Ruffini have the answer for you there. You will not be able to solve for an algebraic solution for the roots. Polynomials of order 5 or higher, you are cooked. At best, a numerical solution is all you can ever do.
That means you COULD decide to try to solve it numerically. Still an immense task, but at least you can accomplish something. You won't get any kind of intelligent relationship out the end, nothing you can write down in a paper or thesis, even if you have a billions trees to provide the paper. But you could theoretically get sets of pairs of points that solve the problem in the (R,a) plane. For example, choose any numerical value for a. Then use a search routine to try to find all possible solutions for R. There will almost certainly be multiple solutions. There may even be infinitely many solutions, though without looking carefully at the problem, I think there will be only a finite set. (I don't see that R and a ever appear inside a trig or bessel function, usually the cause of infinite solutions.) But there may be dozens of solutions, some of which (but maybe not all) will surely be complex.
You could try to plot those solutions in the plane, and hope to make some sense of what you see. But that is about where you will be stuck.
And, oh, will that numerical solution of the roots of the determinant be easy to accomplish? Sadly, but no. Again, you will be in trouble, because finding the roots of extremely high order polynomials is itself a highly problematic thing to do. Double precision arithmetic may well fail you here, and your ability to solve for those roots may itself be an issue. Expect even this computation to possibly take days to perform, and even then, knowing you have found ALL of the roots of that complicated mess may be difficult.
In the end, we have become spoiled in this age of computers that are fairly powerful, sitting on our laps, even in our telephones. We think they are able to do anything. The thing is it is incredibly easy to generate problems with provably no analytical solutions, or problems that are simply too complex to solve, regardless how big is your computer. And since we were able to solve the small problems so easily, then make the small problem just a little bigger, then more so, until what worked for the small problems no longer applies.
  6 comentarios
Walter Roberson
Walter Roberson el 4 de Ag. de 2022
Depending what you are doing at the Maple level, you might be able to use maple's CodeGeneration[Matlab] to generate the MATLAB code. https://www.maplesoft.com/support/help/maple/view.aspx?path=CodeGeneration%2FGeneral%2FMatlabDetails
I created an improved version of that package, but unfortunately my version is not completely reliable.
Torsten
Torsten el 4 de Ag. de 2022
You don't need to supply the determinant in its explicit form to use "fmincon".
Just calculate the matrix p as above, use "matlabFunction" to turn it into a function handle that depends on R and a.
Then make a loop over the a-range of interest and use fmincon to get minimum R under the equality constraint det(p(a,R)) = 0.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by