Symbolic Linear system returns wrong solution.
조회 수: 2 (최근 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!