# Question:Solving piecewise set of 4th order homogeneous ODE with 20 BCs

## Question:Solving piecewise set of 4th order homogeneous ODE with 20 BCs

Maple

Hi Maplers,

I'm struggling to write the correct code for this structural problem below.

The goal is to find the piecewise code for the horizontal deflection of a vertical beam (representing a offshore wind turbine) consisting of 5 segments. Below the EoM for the 5 segments, where segment 1 is in the soil hence the ksoil*u1(z) part.

sysODE := {
EI2*diff(u2(z), z, z, z, z) + m2*g*diff(u2(z), z, z) = 0,
EI3*diff(u3(z), z, z, z, z) + m3*g*diff(u3(z), z, z) = 0,
EI4*diff(u4(z), z, z, z, z) + m4*g*diff(u4(z), z, z) = 0,
EI5*diff(u5(z), z, z, z, z) + m5*g*diff(u5(z), z, z) = 0,
EI1*diff(u1(z), z, z, z, z) + m1*g*diff(u1(z), z, z) + ksoil*u1(z) = 0}

To find the general solution the dsolve function is used. This gives 5 eqs describing u1(z).. u5(z), with in total 20 unknown constants depicted as: _C1.._C20.

Now I have 20 BCs, shown below:

bcs := {
eval(subs(z = z2, EI2*diff(u2, z, z, z)) + Fwave = subs(z = z2, EI3*diff(u3, z, z, z))),
eval(subs(z = z5, EI5*diff(u5, z, z, z)) + Fwind = 0),
eval(subs(z = 0, EI1*diff(u1, z, z)) = 0),
eval(subs(z = 0, EI1*diff(u1, z, z, z)) = 0),
eval(subs(z = z1, u1) = subs(z = z1, u2)),
eval(subs(z = z1, diff(u1, z)) = subs(z = z2, diff(u2, z))),
eval(subs(z = z1, diff(u1, z, z)) = subs(z = z2, diff(u2, z, z))),
eval(subs(z = z1, diff(u1, z, z, z)) = subs(z = z1, diff(u1, z, z, z))),
eval(subs(z = z2, u2) = subs(z = z3, u3)),
eval(subs(z = z2, diff(u2, z)) = subs(z = z2, diff(u3, z))),
eval(subs(z = z3, u3) = subs(z = z3, u4)),
eval(subs(z = z3, diff(u3, z)) = subs(z = z3, diff(u4, z))),
eval(subs(z = z3, diff(u3, z, z)) = subs(z = z3, diff(u4, z, z))),
eval(subs(z = z3, diff(u3, z, z, z)) = subs(z = z3, diff(u4, z, z, z))),
eval(subs(z = z4, u4) = subs(z = z5, u5)),
eval(subs(z = z4, diff(u4, z)) = subs(z = z4, diff(u5, z))),
eval(subs(z = z4, diff(u4, z, z)) = subs(z = z4, diff(u5, z, z))),
eval(subs(z = z4, diff(u4, z, z, z)) = subs(z = z4, diff(u5, z, z, z))),
eval(subs(z = z5, EI5*diff(u5, z, z)) = 0)};

How do I write the correct Maple-code to find C1..C20.