On Monday, November 2, 2015 at 1:47:52 AM UTC+2, Trevor Hutchinson wrote:
>
> Hello,
>
> I have what I think is a simple problem but I am struggling. I seek the 
> non-trivial solution to a homogenous linear system of equations given by Ax 
> = b, where A is matrix of symbolic variables, x is coefficients, and b is 
> zero vector.
>
> I have been trying the following code:
> ***********************************************
> from numpy import *
> from sympy import *
> import sympy.matrices.matrices
>
> a2, a3, k2_prime, rho2, rho2_prime_prime = symbols('a2 a3 k2_prime rho2 
> rho2_prime_prime', real=True)
>
> A = Matrix([[exp(rho2*a2) , -exp(1j*k2_prime*a2) ,-exp(-1j*k2_prime*a2) , 
> 0 ],
> [rho2*exp(rho2*a2), -1j*k2_prime*exp(1j*k2_prime*a2), 
> -1j*k2_prime*exp(-1j*k2_prime*a2), 0],
> [0, exp(1j*k2_prime*a3), exp(-1j*k2_prime*a3), exp(-rho2_prime_prime*a3)],
> [0, 1j*k2_prime*exp(1j*k2_prime*a3), -1j*k2_prime*exp(-1j*k2_prime*a3), 
> -rho2_prime_prime*exp(-rho2_prime_prime*a3)]])
>
>
> g = MatrixBase.singular_values(A)
>
> print g
>
> **********************************
>
> But the result is a null matrix. I know the matrix is not singular so it 
> should have a non-trivial solution. This is obviously solvable with pen and 
> paper but being able to do this for arbitrary dimension would save time. 
> Does anyone have any suggestions for why this is failing? 
>
> I tried using svd in matlab but it will not work for symbolic 
> (non-numerically-expressible) variables nor complex valued functions so 
> that's out. 
>

It seems that the matrix is too complicated for  SymPy to find its 
``singular_values``. But even if it did, I suspect that those would not be 
of much use for finding non-trivial solutions of the homogeneous equation 
``Ax = 0``. In fact, there are none when ``A`` is non-singular.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/a7e16218-935b-444a-8aa3-f4f266f6e647%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to