import java.util.*;
import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
import javax.swing.*;

public class HT_xt_sonsuzduvar
{
public static double T(double Ti,double T0,double alpha,double x,double t)
{double y=x/2/Math.sqrt(t*alpha); 
double T1=(Ti-T0)*Mathd.erf(y)+T0;
return T1;
}



     public static void main (String args[])  
     { //fb f=new fb(); 
       double Ti,T0,x,t,alpha;
       Ti=Double.parseDouble(JOptionPane.showInputDialog(" t=0 daki duvar sıcaklığı Ti: "));
       T0=Double.parseDouble(JOptionPane.showInputDialog(" t>0 daki duvar yüzey sıcaklığı T0: "));
       t=Double.parseDouble(JOptionPane.showInputDialog(" zaman t: "));
       x=Double.parseDouble(JOptionPane.showInputDialog(" duvar yüzeyinden mesafe: "));
       alpha=Double.parseDouble(JOptionPane.showInputDialog(" alpha=ro/k/Cp: "));
       JOptionPane.showMessageDialog(null," T = "+T(Ti,T0,alpha,x,t),
       "duvarda zamana bağlı ısı transferi  : ",JOptionPane.PLAIN_MESSAGE);
       System.exit(0); 
     } 
}