Symbolic Linear system returns wrong solution.
3 ビュー (過去 30 日間)
古いコメントを表示
I would like to solve the symbolic defined integrals U and V in terms of the variable X, how can I do that?
syms C0 C1 C2 C3 C4 X L EI q;
%__________________________________________________
% POLYNOMIAL 4TH
Y3(X) = C0 + C1*X + C2*X^2 + C3*X^3 + C4*X^4;
% Y3(X) DERIVATIVES:
dY3(X) = diff(Y3(X),X);
d2Y3(X) = diff(dY3(X),X);
% RAYLEIGH RITZ METHOD
U = + (EI/2) * int((d2Y3(X))^2,[0 L]);
V = - q * int(Y3(X),[0 L]);
PI = U + V;
% BOUNDARY CONDITIONS IN Y3(X)
cc1 = Y3(0) == 0;
cc2 = Y3(L) == 0;
cc3 = -EI*d2Y3(L) == 0;
cc4 = -EI*d2Y3 (0) == 0;
% NEW BOUNDARY CONDITION FROM THE RR METHOD
dPIdC4 = diff (PI,C4);
cc5 = dPIdC4 == 0;
% SYSTEM LINEAR SOLVING
R = solve([cc1,cc2,cc3,cc4,cc5],[C0,C1,C2,C3,C4]);
C0 = R.C0;
C1 = R.C1;
C2 = R.C2;
C3 = R.C3;
C4 = R.C4;
disp 'CONSTANTES C'
disp ([C0;C1;C2;C3;C4]);
Y3(X) = C0 + C1*X + C2*X^2 + C3*X^3 + C4*X^4;
disp 'EQUAÇÃO DA LINHA ELÁSTICA';
disp (Y3(X));
disp 'EQUAÇÃO DO MOMENTO';
M3(X) = -EI * diff(diff(Y3(X),X),X);
disp(M3(X));
As it is, the the integral solution for U and V is in terms of X, what is wrong. 'X' should disappear .
2 件のコメント
採用された回答
Divija Aleti
2021 年 4 月 21 日
Hi Tiago,
I understand that you are getting wrong solutions but there is nothing wrong with the working of the code. I suggest you re-check your initial assumption of Y3(X) as a polynomial (try taking a combination of trigonometric functions and later use Taylor series expansion to expand them) or maybe try using different boundary conditions.
Hope this helps!
Regards,
Divija
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!