# To find the Null space of a matrix which contains trig functions. the main objective is to find the green function of the differential equation

(* I am trying to find the null space of a matrix I used NUllspace command but I am getting the empty matrix and I also tried gauss elimination. All I am doing is I am finding out a green function a fourth order differential equation. I Used GreenFunction command in Mathematica I have given 4 boundary condition still I could not able to get the Green function solution *)

        W1 = C2*Sin[\[Beta]*x] + C4*Sinh[\[Beta]*x]
W2 = B2*Sin[\[Beta]*(1 - x)] + B4*Sinh[\[Beta]*(1 - x)]
(*Compatability condition*)
ccd1 = (W1 /. {x -> z}) - (W2 /. {x -> z});
ccs1 = ((D[W1, {x}]) /. {x -> z}) - ((D[W2, {x}]) /. {x -> z})
ccm1 = ((D[W1, {x, 2}]) /. {x -> z}) - ((D[W2, {x, 2}]) /. {x -> z})
ccsh1 = ((D[W1, {x, 3}]) /. {x -> z}) - ((D[W2, {x, 3}]) /. {x -> z})
R = Normal@
CoefficientArrays[{ccd1, ccs1, ccm1, ccsh1}, {C2, C4, B2, B4}][[2]]
S = R // MatrixForm
NN1 = [NullSpace[R]]
(*Greenfunction *)
GreenFunction[{(u''''[x] - \[Beta]^4*u[x]), u[0] == 0, u''[0] == 0,
u[1] == 0, u''[1] == 0}, u[x], {x, 0, 1}, y]

• It's not surprising that NullSpace returns an empty matrix since there's no reason that any of the eigenvalues would be identically zero for all beta and z. Sep 10, 2017 at 11:13

As pointed out by aardvark2012, your matrix is invertible and thus its null space is empty. To see for which parameter values it is not invertible, you can do Simplify[Det[S] == 0] to get the simple answer β Sin[β] Sinh[β] == 0. So, for example:

NullSpace[S /. β -> π]


gives

{{Csc[π z] Sin[π (1 - z)], 0, 1, 0}}


and

NullSpace[S /. β -> 8 I π]


gives

{{-((Csch[8 π z] (Cos[8 π (1 - z)] +Cot[8 π z] Sin[8 π (1 - z)]) Sinh[8 π (1 - z)])/(Cosh[8 π (1 - z)] + Coth[8 π z] Sinh[8 π (1 - z)])),
Csc[8 π z] Sin[8 π (1 - z)],
-((Cos[8 π (1 - z)] Sinh[8 π z] +
Cot[8 π z] Sin[8 π (1 - z)] Sinh[8 π z])/(Cosh[8 π z] Sinh[8 π (1-z)] + Cosh[8 π (1 - z)] Sinh[8 π z])),
1}}