フィルターのクリア

integral

5 ビュー (過去 30 日間)
Nasir Qazi
Nasir Qazi 2012 年 5 月 5 日
can I able to integrate a function with some limits a, b but without define the values to the limit , e.g f(x) = x^3 -3*x , having limits x1, x2 but I don't want to assign the values to it . can I integrate it in Matlab

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 5 月 5 日
If you have the symbolic toolbox you can use int()
  1 件のコメント
Nasir Qazi
Nasir Qazi 2012 年 5 月 5 日
can you solve the above example just to have an idea , I knw about syms but don't know, we can use it for limit integrals

サインインしてコメントする。


bym
bym 2012 年 5 月 5 日
syms x a b
>> f = x^3-3*x;
>> int(f,a,b)
ans =
-((a + b)*(a - b)*(a^2 + b^2 - 6))/4
  5 件のコメント
Nasir Qazi
Nasir Qazi 2012 年 5 月 6 日
% similarly here the answer is wrong
syms H R T a b
f = int((H/R*T^2),T,a,b)
f =
-(H*(a^3 - b^3))/(3*R)
% where 'H' , 'R', are constants and 'a', 'b' are limits and integrate it with respect to 'T' which on hands calculation is different and here it is wrong , why ?
Walter Roberson
Walter Roberson 2012 年 5 月 11 日
That integral for f is certainly correct, as can be seen by removing the constant and realizing one is really only dealing with the integral of T^2, which of course yields 1/3*T^3
((T - T0)*(2*cp0 + T*b - T0*b))/2 is correct for the integral of cp with respect to T over T0 to T, but only provided that b(T-T0) is interpreted as meaning b*(T-T0) rather than b indexed at T-T0.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by