solve double differentiation with two limits

%% hello I am trying to solve the equation with double differentiation of M_z which is equal to w_x get the value of M_z(x) but could not solve it. Could you please help me to solve this equation. M_z(x= 0) = -150 and M_z(x= L) = 250 are given
clc;
close;
clear;
syms d_F ;
syms d_F_c;
syms dM_B;
%syms Theta_B;
syms x real;
syms u_mid;
syms u_c;
syms u_max;
syms a;
syms w_x;
syms M_z;
%syms n;
%Q = 2.5; %kip/ft
L = 30.; % ft
%a = 18; %assume maximum deflection at 15', 20'
E = 29000.*12^2; %ksi to kips/ft2
I = 1890./(12)^4; %ft^4
E_I = E.*I; %kip*ft^2;
%% deflection at mid of AB
%P = 1;
%R = 1;
%syms u_2;
%R = 1
w_x = @(x) -1*x/(L/3)*heaviside(x-L/3)*(1-heaviside(x-2*L/3));
w_x_1 = w_x(x);
eq1 = gradient(M_z(x),2) == -w_z(x);
soln1 = dsolve(eq1, M_z(0)==-150, M_z(L) == 250);
fplot(x, w_x(x), [0,L]);

 채택된 답변

VBBV
VBBV 2022년 10월 29일
편집: VBBV 2022년 10월 29일
clc;
close;
clear;
syms d_F ;
syms d_F_c;
syms dM_B;
%syms Theta_B;
syms x real;
syms u_mid;
syms u_c;
syms u_max;
syms a;
% syms w_x;
syms M_z(x);
%syms n;
%Q = 2.5; %kip/ft
L = 30.; % ft
%a = 18; %assume maximum deflection at 15', 20'
E = 29000.*12^2; %ksi to kips/ft2
I = 1890./(12)^4; %ft^4
E_I = E.*I; %kip*ft^2;
%% deflection at mid of AB
%P = 1;
%R = 1;
%syms u_2;
%R = 1
w_x = @(x) -1*x/(L/3)*heaviside(x-L/3)*(1-heaviside(x-2*L/3));
w_x_1 = w_x(x)
w_x_1 = 
eq1 = diff(M_z(x),2) == -w_x_1
eq1 = 
soln1 = dsolve(eq1, [M_z(0)==-150, M_z(L) == 250])
soln1 = 
fplot(x, w_x(x), [0,L]); axis([0 30 -5 2])

댓글 수: 3

Milan
Milan 2022년 10월 29일
Hello, It works but here I need to calculate M_z(x) which is moment. I don't think sol1 is M_z(x), is it?
VBBV
VBBV 2022년 10월 29일
sol1 is for moment variable M_z(x) . please open a new question for your problem
Milan
Milan 2022년 10월 29일
I did it, could you please have a look?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

2022년 10월 29일

댓글:

2022년 10월 29일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by