フィルターのクリア

integration using two variables

2 ビュー (過去 30 日間)
Ramneet Sidhu
Ramneet Sidhu 2019 年 10 月 25 日
回答済み: Walter Roberson 2019 年 10 月 25 日
I have two expressions for variables a and x
M = (-150 + 20.556*x - ((1/2)*(x-10)^2 - (1/60)*(x-10)^3))*heaviside(20-x) + (5.556*x+(250/3))*heaviside(x-20);
m = (a*(1-x/30))*heaviside(20-a) + (x*(1-a/30)*heaviside(20-x) + a*(1-x/30)*heaviside(x-20))*heaviside(a-20);
And another expression
Mm = M*m;
I want to integrate Mm with respect to x treating a as a constant from x = 0 to x = 30. How can i do it?

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 10 月 25 日
Use the symbolic toolbox
syms x a
M = (-150 + 20.556*x - ((1/2)*(x-10)^2 - (1/60)*(x-10)^3))*heaviside(20-x) + (5.556*x+(250/3))*heaviside(x-20);
m = (a*(1-x/30))*heaviside(20-a) + (x*(1-a/30)*heaviside(20-x) + a*(1-x/30)*heaviside(x-20))*heaviside(a-20);
Mm = M*m;
result = simplify( int(expand(Mm), x, 0, 30) );

カテゴリ

Help Center および File ExchangeFormula Manipulation and Simplification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by