<jupyter_start><jupyter_text>1. A Numerical Solution to The Heat Equation*By <NAME>******* *For solving this problem you don't need to know anything outside the course's syllabus. But if you are interested and you haven't passed Engineering Mathematics yet, you can read about the Heat Equation from [here.](https://en.wikipedia.org/wiki/Heat_equation)*<jupyter_code>%%latex
\begin{equation}
\frac{\partial^{2} T}{\partial x^{2}}+\frac{\partial^{2} T}{\partial y^{2}}=0 \\
x,y\in[0,10] \\
T(x,10)=100,\space T(x,0)=T(0,y)=T(10,y)=0 \\
\end{equation}<jupyter_output><empty_output><jupyter_text>In this problem, we want to solve the heat equation for a square metal plate. As stated above, the edges are kept at constant tempretures and we are solving the problem in the steady state.  1.1 Discretizing the Equation*** We have to choose a finite number of points inside the metal square and calculate the tempreture for each of these points. In other words, we break the continues intervals, $x,y\in[0,10]$ and set $x,y$ to be :$$x=n\Delta x, \space y = m \Delta y: \space  \space n,m\in \mathbb{N},\space \text{and} \space n,m \leq K$$* a) Set $\Delta x, \Delta y$.<jupyter_code>Deltax = 
Deltay =<jupyter_output><empty_output><jupyter_text>* b) Write the heat equation for discrete coordinates.<jupyter_code>%%latex
\begin{equation}
....
\end{equation}<jupyter_output><empty_output><jupyter_text>* c) We define $T_i,_j = T(x_i,y_j)$ Where $x_i = i\Delta x,\space y_j=j\Delta y$. Write $T_i,_j$ using only: $ T_{i+1,j}, T_{i-1,j},T_{i,j+1},T_{i,j-1}$<jupyter_code>%%latex
\begin{equation}
....
\end{equation}<jupyter_output><empty_output><jupyter_text>1.2 Solving The Discrete Equation****  a) We should choose an intial value for each of the points to solve the equation iteratively. Wisely choose constant value for all the points inside the metal square!<jupyter_code>T0 =<jupyter_output><empty_output><jupyter_text>* b) State why you chose the value above. (Bonus point for wiser choices) * c) Using what you have calculated, write a program that solves the given PDE.<jupyter_code># Import Packages:


#Initialize the rest of the variables:


# Write the iterative code that solves the equation:<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13324360699865412, 'fraction_numerical': 0.013907581875280395, 'mean_word_length': 5.463768115942029, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '577157', 'license': 'MIT', 'n_tokens_mistral': 780, 'n_tokens_neox': 750, 'n_words': 258, 'path': 'PyHW.ipynb', 'repo_name': 'svarthafnyra/Fun-with-Data', 'size': '2239'}