フィルターのクリア

How can I solve this integral equation?

2 ビュー (過去 30 日間)
Roberto
Roberto 2017 年 4 月 11 日
回答済み: Zeeshan Salam 2019 年 12 月 1 日
Hello everyone, my name is Jose from Sevilla.
I have a function f(T) given by:
f(T)=a+bT+cT^2, where a,b and c are known numbers and T denotes Temperature.
Now I have this equation, where d is yet another constant:
I need to solve for T2, since T1 is also known. In fact, the only unknown here is T2.
I thought about using the trapz function, but I don't know how to include the T2 unknown. Any help will be greatly appreciated! (Important: I don't have the Symbolic Math Toolbox, so I can't do it symbolically. I don't have access to the Optimization Toolbox either, so fsolve and solve are ruled out, too).
Thank you!

回答 (3 件)

Roger Stafford
Roger Stafford 2017 年 4 月 12 日
I would suggest utilizing a little calculus here:
integral of a+b*T+c*T^2 w.r. T from T = T1 to T = T2
is equal to:
I = a*(T2-T1)+b/2*(T2^2-T1^2)+c/3*(T2^3-T1^3)
or
c/3*T2^3+b/2*T2^2+a*T2-c/3*T1^3-b/2*T1^2-a*T1-I = 0
You have said everything is known except T2, so you can express T2 as the real solution (or solutions) to:
T2 = roots([c/3,b/2,a,-c/3*T1^3-b/2*T1^2-a*T1-I]);
  2 件のコメント
Jose Lopez
Jose Lopez 2017 年 4 月 12 日
Thank you, since f(T) is always a polynomial your solution will work in my case withouth integrating f.
Never heard of root. Thank you again!
Roger Stafford
Roger Stafford 2017 年 4 月 12 日
You need to be prepared for multiple roots from 'roots'. Presumably just one of them will be the one you want. An n-th order polynomial always yields n roots even though some of them may be complex-valued. That is not a difficulty introduced by 'roots' or matlab. It is inherent in the statement of your problem.

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


Roberto
Roberto 2017 年 4 月 29 日
One more question. I think the answer wouldn't be as straightforward in case that f(T) was of the form:
f(T) = a + b*T + c*T^2 + d/T
What would be the best approach in this case? Now the roots function wouldn't work since f(T) isn't a polynomial..
  1 件のコメント
Roger Stafford
Roger Stafford 2017 年 4 月 30 日
I disagree. ‘roots’ will still work here. The equation
f(T) = a + b*T + c*T^2 + d/T
is equivalent to the equation
c*T^3+b*T^2+(a-f(T))*T+d = 0
which can also be solved with ‘roots’ assuming f(T) is known. You will, however, get three solutions to this third degree equation.

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


Zeeshan Salam
Zeeshan Salam 2019 年 12 月 1 日
how i implement the integral function of this equation sin square 6 theta dtheta

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by