MHB How do we choose the number of subintervals?

  • Thread starter Thread starter evinda
  • Start date Start date
AI Thread Summary
Choosing the number of subintervals, N_x and N_t, for approximating the heat equation involves ensuring that the partition is sufficiently refined to achieve a desired accuracy. A practical approach is to verify that the difference between solutions from successive refinements is within a specified tolerance, which can be assessed by halving each subinterval and comparing the results. When the exact solution is known, the approximation can be evaluated by selecting random points in the (x,t) plane, calculating the squared differences between the approximate and exact solutions, and summing these values. This method provides a quantitative measure of the accuracy of the approximation. Ultimately, the goal is to ensure that the chosen partitions yield results that converge closely to the true solution.
evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)

I have written a code to approximate the solution of the heat equation. I want to consider uniform partitions in order to approximate the solution of the given boundary / initial value problem.

So we partition $[a,b]$ in $N_x$ subintervals with length $h=\frac{b-a}{N_x}$, where the points $x_i, i=1, \dots ,N_x+1$, are given by the formula $x_i=a+(i-1)h$, and so we have $a=x_1<x_2< \dots <x_{N_x}<x_{N_{x+1}}=b$ and respectively we partition $[0,T_f]$ in $N_t$ subintervals of length $\tau=\frac{T_f-t_0}{N_t}$ and the points are $t_n=t_0+(n-1)\tau, n=1, \dots ,N_t+1$, so we have $t_0=t_1<t_2<\dots< t_{N_t}<t_{N_{t+1}}=T_f$.


Is there a criterion to choose $N_x$ and $N_t$ ? (Thinking)
 
Mathematics news on Phys.org
Well, if you don't have the exact solution available, then one way to show your partition is good enough is to pretend your metric space is complete (Cauchy sequences converge). What I mean by that is you would show that your partition is good enough if, say, you divided each subinterval in half, and your solution did not differ from your previous solution by more than some pre-specified tolerance. The hope is that you're working in a complete space, so that if your solutions differ from each other by a very little bit, they are close to the true solution. Does that make sense?
 
In our case, the solution is given.
 
In that case, you would compare your approximation with the exact solution, and see if it's in some tolerance. Now, you have to be careful how you compare. I would probably do something like this: pick a bunch of random points in the $(x,t)$ plane, evaluate your approximation there and the exact solution there, square the difference (or take its magnitude), and add them all up. You might have some predetermined method of comparison, but I would think it would need to be something like this method.
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top