Currently I'm learning about maple. I'm studying structural mechanics and we need to use maple to evaluate expressions. The following code is for an exercise to use castigliano's second theorem to evalute the moment T. This is probably carelessness/inexperience from my side, but due to Covid the university is closed and I can't get help from instructors. If somebody could give me feedback, that would be great!
M1 := 1/2*q*x*(l - x);
M2 := -T + T*x/l;
Ec := int((M1 + M2)^2/(2*EI), x = 0 .. l);
eq1 := diff(Ec, T) = 0;
Error, invalid input: diff received (1/8)l^2q, which is not valid for its 2nd argument
sol := solve(eq1, T);
assign(sol);
Warning, solving for expressions other than names or functions is not recommended.
Error, invalid left hand side in assignment
evalf(T);
Although it throws errors and warnings, it still evaluates the correct answer. But these warnings are bothering me.
Question:
- What did I do incorrect to cause these warnings/errors?
- How can I avoid errors/warnings?