ClearAll
, without arguments, does not clear anything at all, I suspect.
Cos[\[Theta]], Sin[\[Theta]], (\[Theta]')^2
do nothing useful for you; you should use Cos[\[Theta][x]], Sin[\[Theta][x]], (\[Theta]'[x])^2
.
The quantity U
is best written as a function of the parameters q1,q2,q3
, not of \[Theta]
.
This works:
Clear[q1, q2, q3, x, \[Theta], U]
w = 4.7;
h = 3.4;
A = 25;
\[Nu] = 0.45;
L = 36*Pi;
R = 36;
(*Steifigkeiten*)
a1 = 4*A*\[Pi]*w*h^3;
a2 = 4*A*\[Pi]*w^3*h;
a3 = (2*A*h*w*(h^2 + w^2))/(1 + \[Nu]);
\[Theta][x_] = q1 + q2*x + q3*x^2;
Solve[{\[Theta][0] == 0, \[Theta]'[0] == 0}]
U[q1_, q2_, q3_] =
Integrate[(1/2)*(a1/R^2*Cos[\[Theta][x]]^2 +
a2/R^2*Sin[\[Theta][x]]^2 +
a3/L^2*(\[Theta]'[x])^2),
{x, 0, 1}];
Plot[U[0, 0, q3], {q3, -2, 2}]
result = NMinimize[U[0, 0, q3], q3]