I provide an example but am really asking (at end) for general tips of how to feed initial conditions to Mathematica best.
ex. A beam rests on walls at each end. m[] is the moment (forces) of weight/ft on a beam due to it's own weight, e i are constants, At one end the beam is held (ex in mortar) and this adds unknown moment M. (tennenbaum p.388, 13.)
Question: I have 5 initial conditions. I'm told I need to use 3 to find M. If I give some to Mathematic I can at best get rid of C[] but not M. If i delete all initial conditions and apply 3 by hand afterward, M is easy to find with no error messages.
(* y[0] == 0, y'[0] == 0, y'[L] == 0, y[2 L] == 0, y'[2 L] == 0 *)
m[x_] := (L w) x(*up F*) - (w x) (x/2)(*down F*);
DSolveValue[{e i y''[x] == m[x] + M,
y[0] == 0, y'[0] == 0, y[2 L] == 0}, y[x], x] (* no *)
... DSolve: For some branches of the general solution, the given boundary \
conditions lead to an empty solution.
yc=DSolveValue[{e i y''[x] == m[x] + M}, y[x], x]
By hand I can use yc with y[0]==0 to eliminate C1, then it's D with y'[0]==0 for C2, then y[2L]==0 finds M. I gather Mathematica runs into the error it mentions but not sure how to avoid it and I didn't run into it myself (though i didn't over-analyze the algebra).
It's not uncommon to have questions about using initial conditions in Mathematica. How do I best use Initial Conditions with Mathematica? What are the things to avoid and the things to provide it?