I have a big 1000*1000 symbolic matrix (some of its diagonal entries are function of x variable), is there a trick way to calculate closed form inverse of a such matrices in Matlab or Maple?
My experience with symbolic matrix inversion is that Matlab answers with "out of memory" from matrices 4 x 4 and more. However, my info is a bit old and it could be outdated regarding the current version of Matlab.
If only some of your diagonal elements are a function of x you might want to permute rows and columns such that they all reside in the, say upper-left block. Then you can apply Schur complements so simplify the analysis (search wikipedia for block matrix inversion). However, even this will only help you if the block is significantly smaller than 1000 x 1000. In general, try simplifying the problem as much as you can on paper before tossing it into a symbolic math engine, using all of the available structural information you have.
P.S.: The complexity of your result depends on how many elements depend on x and in which way. Let's take the simplest case and say all elements in your original matrix are linear/affine functions (degree-1 polynomials) in x. Then, if N of your diagonal elements depend on x, each element of the resulting matrix will be a rational function of degree N. For quadratic functions, expect degree 2N. If N is not very small I doubt that the result will be very useful to be honest.
Well, in this case the determinant of A is a order 2000 polynomial. Therefore, every element of A is an order 2000 rational function. I'm pretty sure that even if you could compute A entirely, a 1000 x 1000 matrix of rational functions order 2000 would not be very useful. It would be quite a challenge to even properly evaluate it at a certain x.
Another thing you can try is approximate inversion if you don't need the exact inverse. You can use the fact that inv(I+x^2 A) \approx I - x^2 A + x^4 A^2 - x^6 A^3 ...
You can apply this to inv(B + x^2 C) by factoring out B and setting A = inv(B)*C [if you can form inv(B)]. The convergence of this series will depend on the spectral radius of A, which must be less than one (the smaller the fewer terms you need). If your matrix C is "small" compared to B you might have a chance.