# Can somebody please guide how to solve this implicit relation for T under different values of t, i have tried using solve, fsolve and fzero but not getting correct answer

1 view (last 30 days)

Show older comments

syms T %temperature

c=2010; To=70; Tr=200;

sigma=0.119e-10; epsilon=1; rho=0.101;

H=1; %assumption

for t=0:10;

fnc=(sigma*epsilon/rho/c/H*t)+((1/4/Tr^3)*(log((Tr-T)*(Tr+To)/(Tr+T)/(Tr-To))+(2*atan(T/Tr))));

solve (fnc==0, T)

end

##### 2 Comments

Roger Stafford
on 10 Apr 2016

It is unlikely that 'solve' can solve this equation. Please show us what you have tried with 'fzero'. That is your best bet. It will require that you give an initial estimate for each value of t. That may be the most difficult part. I suggest making a plot of the value of your expression as a function of T to see roughly where it crosses zero for each different value of t.

Incidentally, what happened to the term "2*arctan(To/Tr)" in your expression?

### Answers (2)

John BG
on 10 Apr 2016

Since there is only one t on the left of the equation:

c=2010; To=70; Tr=200;

sigma=0.119e-10; epsilon=1; rho=0.101;

H=1;

T=[-274:1:50]

t=rho*c*H/(sigma*epsilon)*((1/4/Tr^3)*(log((Tr-T)*(Tr+To)/(Tr+T)/(Tr-To))+(2*atan(T/Tr))))

plot(t);grid on

figure(2);plot(t,T)

figure(2);plot(t,T);grid on

if you try to visualize the function you try to zero, with the expression you used in the question,

T=[-274:.1:50]

t=[-50:.1:50]

[X Y]=meshgrid(T,t)

Z=(sigma*epsilon/rho/c/H*Y)+((1/4/Tr^3)*(log((Tr-X)*(Tr+To)/(Tr+X)/(Tr-To))+(2*atan(X/Tr))));

figure(3);surf(X,Y,Z)

MATLAB fills up Z with NaN.

But adding a dot, element wise division inside the log, and simplifying the quotient expression inside the log to a single / then:

T=[-274:1:50]

t=[-50:1:50]

[X Y]=meshgrid(T,t)

Z=(sigma*epsilon/rho/c/H*Y)+((1/4/Tr^3)*(log((Tr-X)*(Tr+To)./((Tr+X)*(Tr-To)))+(2*atan(X/Tr))));

absZ=abs(Z)

figure(3);surf(X,Y,absZ)

note:

1.- complex result, only plotting abs(Z)

2.- T=Tr asymptotic

3.- you are trying to find a zero of a really a function handling really small values, perhaps you may want to consider modifying the function to find where the asymptote crosses zero, that may be ~Tr, and then it all ends up simplified to t=0.

If you find this answer of any help solving your question, please click on the thumbs-up vote link,

thanks in advance

John

##### 2 Comments

Walter Roberson
on 10 Apr 2016

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!