# Solve function used symbolic computation yields all the coefficients value zeros

I am trying to compute the symbolic coefficients of using Solve function. But this is yielding all the coefficients values zeros. What are the other ways to find these symbolic coefficeints?

W = a[1]*Sin[b*x] + a[2]*Cos[b*x] + a[3]*Sinh[b*x] + a[4]*Cosh[b*x];
e[1] = D[W, {x, 2}] /. x -> 0
e[2] = D[W, {x, 3}] /. x -> 0
e[3] = W /. x -> L
e[4] = D[W, {x, 1}] /. x -> L
Solve[e[1] == 0 && e[2] == 0 && e[3] == 0 && e[4] == 0, {a[1], a[2],
a[3], a[4]}]

• If they all equal zero then this is an eigenvalue problem. You are asking what values of b give you a non-zero solution. As an alternative you could put a force or moment at one end of the beam (this looks like a beam vibration problem) and then look to see at what frequency the vibration becomes infinite.
– Hugh
Nov 15, 2020 at 15:33

## 3 Answers

For arbitrary b and L this system has no solution other than the trivial one. However we may find a solution for specific b and L. Look at your conditions:

W = a[1]*Sin[b*x] + a[2]*Cos[b*x] + a[3]*Sinh[b*x] + a[4]*Cosh[b*x];
e[1] = D[W, {x, 2}] /. x -> 0
e[2] = D[W, {x, 3}] /. x -> 0
e[3] = W /. x -> L
e[4] = D[W, {x, 1}] /. x -> L
e[1] == 0 && e[2] == 0 && e[3] == 0 && e[4] == 0


From the first condition we get:

-b^2 a[2] + b^2 a[4] == 0


and we see that a[4] == a[2]. Likewise from the second condition: a[3]==a[1]. If we now use this in condition 3 and 4 we get:

a[2]( Cos[b L] + Cosh[b L]) + a[1] (Sin[b L] +  Sinh[b L]) == 0
b a[1] (Cos[b L] + Cosh[b L]) +b a[2](-Sin[b L] + Sinh[b L]) == 0


As MMA is not able to solve both equations simultaneously, we solve singly:

res1 = Solve[e[3] == 0 /. {a[4] -> a[2], a[3] -> a[1]}, {a[1], a[2]}][[1]]
res2 = Solve[e[4] == 0 /. {a[4] -> a[2], a[3] -> a[1]}, {a[1], a[2]}][[1]]


This gives:

{a[2] -> -((a[1] (Sin[b L] + Sinh[b L]))/(Cos[b L] + Cosh[b L]))}
{a[2] -> -((a[1] (-Cos[b L] - Cosh[b L]))/(Sin[b L] - Sinh[b L]))}


Can we now find a value of b L so that both values for a1 are the same? For this we must have:

(Sin[b L] + Sinh[b L])/(Cos[b L] + Cosh[b L]) ==  (-Cos[b L] - Cosh[b L])/(Sin[b L] - Sinh[b L])


A plot of the left and right hand side may help:

Plot[{(Sin[x] + Sinh[x])/(Cos[x] + Cosh[x]),  (-Cos[x] - Cosh[x])/(
Sin[x] - Sinh[x])}, {x, -3, 3}]


We see that a value for b L of approx. +/- 1.8 will do. The exact value can be obtained by:

x1 = x /.
FindInstance[{(Sin[x] + Sinh[x])/(Cos[x] + Cosh[x]) ==  (-Cos[x] - Cosh[x])/(Sin[x] - Sinh[x]), x > 0}, x]


x1 is a root object with numerical value: 1.88.., that is a root of a polynomial that is hidden in the pictogram:

You may always get the numerical value by N[..]

Finally we may test if this values fulfill the given conditions:

res = {e[1], e[2], e[3], e[4]} /. {a[4] -> a[2], a[3] -> a[1]} /.
a[2] -> -((a[1] (Sin[b L] + Sinh[b L]))/(
Cos[b L] + Cosh[b L])) /. (b L) -> x1   // Simplify


This gives:

Condition 1..3 are o.k. The forth condition depends on the root expression in the numerator, that is, besides numerical errors, also zero:

Finally, we have the result: With (b L)= +/- x1 =+/- 1.8751.. (both give the same solution) a[1] can be chosen arbitrarily. Then a[4]=:

and

a[2]==a[4]
a[3]==a[1]


Am I correct in thinking you are looking at beam vibration problems? Starting with your boundary conditions we have:

W = a[1]*Sin[b*x] + a[2]*Cos[b*x] + a[3]*Sinh[b*x] + a[4]*Cosh[b*x];
e[1] = D[W, {x, 2}] /. x -> 0
e[2] = D[W, {x, 3}] /. x -> 0
e[3] = W /. x -> L
e[4] = D[W, {x, 1}] /. x -> L


Now pull together the equations and turn them into a matrix form with unknown values of a[1], a[2], a[3] and a[4]

eqns = {e[1], e[2], e[3], e[4]};
{rhs, mat} =
Normal[CoefficientArrays[eqns, {a[1], a[2], a[3], a[4]}]];


We don't want the trivial solution of the a's being zero so the determinant of the matrix mat must equal zero. Further b and L always occur as a product (in fact the wave number) so we can write

det = Det[mat] /. b -> k/L // Simplify

(* (2 k^6 (1 + Cos[k] Cosh[k]))/L^6   *)


Now k and L are not zero and thus we have

1 + Cos[k] Cosh[k]) == 0


The values of k that make this equation zero are what you want (the eigenvalues). First plot to see rough values:

Plot[1 + Cos[k] Cosh[k], {k, 0, 100}, PlotRange -> {All, {-10, 10}}]


To find the values do

k /. FindRoot[1 + Cos[k] Cosh[k] == 0, {k, #},
WorkingPrecision -> 100] & /@ Table[n π, {n, 50}]


You get the values from this. I know you wanted a symbolic answer but looking at the determinant

1 + Cos[k] Cosh[k]


I think you will quickly see that no symbolic answer is possible.

Hope that helps.

MaxExtraConditions is your friend. Eliminate for simplicity a[3] and a[4]. Then

W = a[1]*Sin[b*x] + a[2]*Cos[b*x] + a[1]*Sinh[b*x] + a[2]*Cosh[b*x];
e[3] = W /. x -> L
e[4] = D[W, {x, 1}] /. x -> L
s = Solve[e[3] == 0 && e[4] == 0, {a[1], a[2]},
MaxExtraConditions -> 1] // FullSimplify


produces one nontrivial solution for $$\cos(bL)\cosh(bL)=-1$$

Notice, that one parameter remains undetermined and should be fixed by, e.g., normalization.