Solve indefinite integral with unknown lower limit

The equation I am trying to solve is attached below,
and my Matlab code is
int(11.6 + 2*10^-3*T - 0.67*10^5*(1/T^2),T,T,1650)
The output I am getting is just "-inf", but it should not be like this, could anyone help me figure this out? Thanks

댓글 수: 4

Why don't you just solve it by hand, not a hard integral.
syms T t
I=int(11.6 + 2*10^-3*T - 0.67*10^5*(1/T^2),T,t,1650);
It is a lot easier to do it by hand, but it's for an assignment so I have to use Matlab unfortunately
And thank you for your help, the output I got is shown below
piecewise(0 < t, 1445605/66 - 67000/t - (t*(t + 11600))/1000, t <= 0, -Inf)
Do I only consider the part where 0 < t? But if I want to sub this answer somewhere else, how should I specify this?
If T were 0 then 1/T^2 would be 1/0 which is a problem. If T were negative then T would have to cross 0 on its way to the positive bound, and you would have infinity again.
So... you should consider putting an assumption of positive on your variable. That would allow int() to generate a plain formula.
@Walter Roberson Thank you for your suggestion. I tried to put a statement before it
t = abs(t);
And now the final answer is
1445605/66 - 67000/abs(t) - abs(t)^2/1000 - (58*abs(t))/5
I assume we can just treat this abs(t) as normal t? Or do you have any better suggestions? Thanks.

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

추가 답변 (1개)

Matt J
Matt J 2022년 3월 5일
편집: Walter Roberson 2022년 3월 5일
Looks like there are 2 solutions.
format long g
T0=1650;
rhs=1e-3*T0^2 + 11.66*T0 + 0.67e5/T0;
p=[1e-3,11.66, -rhs, 0.67e5];
r=roots(p);
T=r(r>0 & imag(r)==0)'
T = 1×2
1.0e+00 * 1650 3.05009448006937

카테고리

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

제품

릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by