# Problem solving BVP using NDsolve

I'm trying to solve an eigth-order linear ODE using NDsolve. The Code I'm using is:

a1 = 0.1407;
a2 = 0.0027;
a3 = -0.0083;
a4 = 0.0966;
a5 = 0.2584;
b1 = 0.7927;
b2 = 0.0644;
b3 = -0.1943;
b4 = -0.0009;
b5 = -0.0009;
b6 = 16.1566;
b7 = 48.5291;
c1 = 0.5041;
c2 = 0.3569;
c3 = 0.1782;
(*b1=0;
b2=0;
b3=0;
b4=0;
b5=0;
b6=0;
b7=0;
c1=0;
c2=0;
c3=0;*)
E1 = 68.9*10^9;
a0 = 4.04*10^-10;
b = 0.6*a0;
L = 30*b;
h = 0.6*b;
I1 = (1/12)*b*h^3;
A1 = b*h;
(*h=10^-25*)
S = (E1*I1) + 2*A1*(a1 - a2 + a3 + 3*a4 - a5);
K = (2*I1*(a1 + a2 + a3 + a4 + a5)) + (2*
A1*(2*b2 - 2*b4 + 2*b5 + 4*b6));
T = (I1)*(c1 + c2 + c3);
J = (2*I1)*(b1 + b2 + b3 + b4 + b5 + b6 + b7);
\[Alpha] = (3*(L^2)/(h^2));
(*\[Alpha]=10^14*)
(*\[Alpha]=6000;*)
\[Mu] = 1;
(*\[Sigma]=-1;*)
bconds = {w[0] == 0,
w[L] == 0,
S*w''[0] - (K - 2*T)*w''''[0] + J*w''''''[0] == 0,
S*w''[L] - (K - 2*T)*w''''[L] + J*w''''''[L] == 0,
(K - T)*w'''[0] - J*w'''''[0] == 0,
(K - T)*w'''[L] - J*w'''''[L] == 0,
T*w''[0] + J*w''''[0] == 0,
T*w''[L] + J*w''''[L] == 0};
o = NDSolve[{S*D[w[x], {x, 4}] - (K - 2*T)*D[w[x], {x, 6}] +
J*D[w[x], {x, 8}] == 10^-5*Sin[Pi*x/L],
bconds}, w, {x, 0, L}]


But this is the error I get: The equations derived from the boundary conditions are numerically ill-conditioned. The boundary conditions may not be sufficient to uniquely define a solution. If a solution is computed, it may match the boundary conditions poorly. >> The scaled boundary value residual error of 2.121314566843545 indicates that the boundary values are not satisfied to specified tolerances. Returning the best solution found. >> Can anyone help me?

• Mathamatica can solve the problem without boundary conditions DSolve[{S*D[w[x], {x, 4}] - (K - 2*T)*D[w[x], {x, 6}] + J*D[w[x], {x, 8}] == 10^-5*Sin[Pi*x/L]}, w, x][[1]] . Now you could adapt the solution to your bc and get some insight... – Ulrich Neumann Aug 6 '18 at 10:58
• Your later boundary conditions contain extremely small numbers (10^-20), which are within the machine precision noise that you give the constants at. – KraZug Aug 6 '18 at 11:41

You have to check your boundary conditions! If you first solve your ode without bc you get

Clear[w]
w = DSolveValue[{S*D[w[x], {x, 4}] - (K - 2*T)*D[w[x], {x, 6}] +J*D[w[x], {x, 8}] == 10^-5*Sin[Pi*x/L]}, w, x]
(*Function[{x},161533. E^(0.049881 x) C[1] + 161582. E^(-0.0498772 x) C[2] +
3.16425*10^-42 E^(2.371*10^10 x) C[3] +
3.16425*10^-42 E^(-2.371*10^10 x) C[4] + C[5] + x C[6] + x^2 C[7] +
x^3 C[8] + (3.36783*10^-40 + 1.33888*10^-61 I) Sin[4.32012*10^8 x]]*)


a solution which depneds on C[1],...C[8].
Substituting in your bc , MMA states problems solving solving for C[i]

Solve[Simplify[ bconds ], Table[C[i], {i, 1, 8}]] // Simplify
(*RowReduce::luc: Result for RowReduce of badly conditioned matrix {{0. +0.
I,0. +0. I,0. +0. I,6.1907*10^-6+0. I,<<1>>,1.95889*10^-47+0. I,1.00031 +0.
I,1. +0. I,0. +0. I},{<<1>>},<<4>>,{0. +<<1>>,<<8>>},{<<1>>}} may contain
significant numerical errors.*)
`