0
$\begingroup$

I have the next function of temperature ($T$): $$f(T)=a+bT+cT^2+dT^3+eT^4$$ (where $a$,$b$,$c$,$d$,$e$ are known constants). I need to solve this equation: $$\int_{T_0}^{T_1}f(T)dT=1$$ The only unknown is $T_1$, which needs to be found ($T_0$ is known).

I need to do this numerically, using Matlab. However I don't have the Symbolic Math Toolbox, nor the Optimization Toolbox (I can't make use of fsolve or solve). Even if I had access to these two Toolboxes, I wouldn't know how to approach the problem.

Any ideas or help will be well received.

$\endgroup$
  • $\begingroup$ so basically you are solving a quintic equation - you can implement a root finder scheme in matlab. By implement write it out from scratch. $\endgroup$ – Chinny84 Apr 11 '17 at 21:45
  • $\begingroup$ Thanks for answering @Chinny84. Would you give me a deeper insight into what you call a root finder? Thank you. $\endgroup$ – Jose Lopez Garcia Apr 11 '17 at 21:51
  • $\begingroup$ You are not going to get a symbolic solution to a quintic polynomial equation. But given actual values of the constants you can use Matlab to find the roots. mathworks.com/help/matlab/ref/… $\endgroup$ – John Wayland Bales Apr 11 '17 at 22:05
1
$\begingroup$

Let $$F(t)=aT+b \tfrac{T^2}{2}+c \tfrac{T^3}{3}+d \tfrac{T^4}{4}+e \tfrac{T^5}{5}.$$

be a primitive function of $f$, meaning that $$\int_{T_0}^{T_1}f(t)dt=F(T_1)-F(T_0).$$

Thus basicaly, you are looking for a solution in $T_1$ such that $F(T_1)=F(T_0)+1$ where $F(T_0)$ is know (i.e., is a constant).

Thus, the simplest thing would be

a) first to plot the graphical representation of $F$ and know where is situated the solution, more exactly "bracket it" between two extreme values.

b) then use a dichotomy search of the roots (sure to be always successful, unlike the fixed point methods).

If you give me some more information (I don't know in particular the degree of supervision you want : maybe you are aiming at a fully autonomous program), I can write down the Matlab program.

$\endgroup$
  • 1
    $\begingroup$ You gave me exactly what I was asking for, thank you. I will try first writing the program on my own, but if I need further help I will be glad to ask you :) $\endgroup$ – Jose Lopez Garcia Apr 11 '17 at 22:57
  • 1
    $\begingroup$ P.S. I was looking for a more autonomous program, but since my function $f(T)$ is always a polynomial like that in my original question, I guess it's OK to save myself the headache of getting Matlab to solve the integral (i.e. we know the primitive). $\endgroup$ – Jose Lopez Garcia Apr 11 '17 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.