# ① Redundancy in writing powerpoint backgrounds

Second Order Runge-Kutta
Consider the situation in which the solution, y(t)to a differential equation.
is to be approximated by computer (starting from some known initial condition, y(t₀)=y₀ ; also, note that the tick mark denotes differentiation). The following text develops an intuitive technique for doing so, and presents some examples. This technique is known as "Second Order Runge-Kutta".
The first order Runge-Kutta method used the derivative at time t₀ ( t₀ =0 in the graph below) to estimate the value of the function at one time step in the future. If you are not familiar with it, you should read the section entitled: A First Order Linear Differential Equation with No Input. We repeat the central concept of generating a step forward in time in the following text.
with the initial condition set as y(0)=3. The exact solution in this case is y(t)=3e -2tt ≥0, though in general we won't know this **redundancy in writing powerpoint backgrounds** will need numerical integration methods to generate an approximation.
In **redundancy in writing powerpoint backgrounds** graph below, the slope Intercultural Communication write essays for money t=0 is called k 1and the estimate is called y*(h) ; in this powerpoint presentation with music production h=0.2 .
This obviously leads to some error go kart project report pdf the estimate, and we would like to reduce this error. One way we could do this, conceptually, is to use the derivative at the halfway point between t=0 and t=h=0.2. The slope at this point ( t=½h=0.1 ) is shown below (and is labeled k 2 ). Note the line (orange) is tangent to the curve (blue) at t=½h .
Now if we use this intermediate slope, k 2as we step ahead in time then we get better estimate, y*(h), than we did before. On the diagram below the exact value of the solution is y(0.1)= 2.0110 and the approximation is y*(0.1)= 2.0175 for an error of about 0.3% (compared with about 10% error for the first order Runge-Kutta).
This seems like a very nice solution, and obviously generates a significantly more accurate approximation than the first order technique that uses a line with slope, k 1calculated at t=0. The problem is we don't know the exact value of y(½h) so we can't find the exact value of k 2 the slope at t=½h (Recall that the calculation of the derivative requires knowledge of the value of the function, y'(t) = - 2y(t) ).
What we do instead is use the First Order Runge-Kutta to generate an approximate value for y(t) at t=½h=0.1call it y 1 ( ½h ). We then use this estimate to generate k **redundancy in writing powerpoint backgrounds** (which will be an approximation to the slope at the midpoint), writing a compare contrast essay Mercersburg Academy then use k 2 to find y*(h). To step from the starting point at t=0 to an estimate at t=hfollow the procedure below.
In general, to go from the estimate t=t₀ to an estimate at t=t₀+h.
Example 1: Approximation of First Order Differential Equation with No Input Using MATLAB.
We international management institute belgium ranking world use MATLAB to perform the calculation described above. A simple loop accomplishes this:
The MATLAB commands match up easily with the steps of the algorithm. A slight variation of the code was used to show the effect of the size of h on the accuracy of the solution (see image below). Note that larger values of h result in poorer approximations, but that the solutions are much better than those obtained with the First Order Runge-Kutta for the same value of h .
For a first order ordinary differential equation defined by.
to progress from saint saens carnival of the animals narrative essay point at t=t₀y*(t₀)by one time step, hfollow these steps (repetitively).
an initial value of the function must greek influence on western culture essay samples given to start the algorithm. see the MATLAB program s on this page for examples. this is often refered to as the "midpoint" algorithm for Second Order Runge-Kutta because it uses the slope at the midpoint, k 2.
Adding an input function to the differential equation presents no real difficulty. You just need to ensure that you evaluate the function at t=t₀ to find k 1and at t=t₀+frac12;h to find k 2. Consider an input of c os(4t) .
Note: the exact solution in this case is $y(t) = 2.9 t>> + 0.1\cos (4t) + 0.2\sin (4t)$.
Example 2: Approximation of First Order Differential Equation with Input Using MATLAB.
We can use MATLAB to perform the calculation described above. To perform this new approximation all that is necessary is to change the calculation of k 1 and k 2 using the appropriate value for the time variable (the value of the exact solution is also changed, for plotting).
A modified version of the program (that uses several values of h ) generated the plot below. As before, the solution is better with smaller values of hand the solutions are much better than those obtained with the First **Redundancy in writing powerpoint backgrounds** Runge-Kutta for the same value of h .
Using a non-linear differential equation presents no real difficulty. Again, you just need to ensure that you evaluate the function at t=t₀ to find k 1and at t=t₀+frac12;h to find k 2. Consider.
$$ \over > - y(t)(1 - 2t) = 0,\quad \quad \quad \quad y(0) = 1$$
with solution (described here)
The process follows those that came before.
Example 3: Approximation of First Order Nonlinear Differential Equation with Input Using MATLAB.
As before, to perform this new approximation all that is necessary is to change the calculation of k 1 and k 2 using the appropriate value for the time variable (the value of the exact solution is also changed, for plotting).
A modified version of the program (that uses several values of h) generated the plot below. As before, the solution is better with smaller values of hand the solutions are much better than those obtained with the First Order Runge-Kutta for the same value of h .
If we start with a higher order differential equation.
We can rewrite as a **redundancy in writing powerpoint backgrounds** differential equation (see previous example if this is unclear)
Proceed as before (using matrices in place of scalars where appropriate.
To perform this new approximation all that is necessary is to change the approriate variables from scalars to vectors or matrices, and to define the A and B matrices. Note that in this case we multiply the B matrix by 1 since the input is a unit step ( **redundancy in writing powerpoint backgrounds** =1 for t ≥0). If the input were a sine wave, the sine wave cheap write my essay dbq atomic bomb multiply B ; if human trafficking essay papers examples is no input, it is not necessary to include the B **redundancy in writing powerpoint backgrounds** at all (it is multiplied by 0).
A modified version of the program (that uses several values of h ) generated the plot below. As expected, the solution is better with smaller values of hand the solutions are much better than those obtained with the First Order Runge-Kutta for the same value of h .
The Second If you think you understand quantum Runge-Kutta algorithm described my aim in life essay in english quotations about life was developed in a purely ad-hoc way. It seemed reasonable that using an estimate for the derivative at the midpoint of the interval between t₀ and t₀+h (i.e., at t₀+½h ) would result in a better approximation for the function at t₀+hthan would using the derivative at t₀ (i.e., Euler's Method &emdash; the First Order Runge-Kutta). And, in fact, we showed that the resulting approximation was better. But, is there a way to derive the Second Order Runge-Kutta from first principles? If so, we might be able to develop even better algorithms.
In the following derivation we will use two math facts that are reviewed here. You should be familiar with this from a course in multivariable calculus.
1) If there is a function of two variable, g(x,y)it's Taylor Series about x₀y₀ is given by:
where Δx is the increment in the first dimenstion, and Δy is the increment in the second dimension. In the creative writing competitions for teenagers line we use a shorthand notation that removes the explicit functional notation, and also represents the partial derivative of g with respect to x as A Storyboard of Your Leadership Journey write your essay for you x (and likewise for g y ).
2) If Alpine Access Jobs Recruiting Home is a function of two variables z=g(x,y)where x=r(t) and y=s(t)then by the chain rule for partial derivatives.
To start, recall that we are expressing our differential equation as.
Now define two approximations to the derivative.
In all cases α and β will represent fractional values between 0 and 1. These equation state that k 1 is the approximation to the derivative based on the estimated value of y(t) at t=t₀ (i.e., y*(t₀) ) and book reviews online ordering applications time at t₀. The value of k 2 is based upon the estimated value, y*(t₀)plus some fraction of the step size, βhtimes the slope k 1and the time at t₀+αh (i.e., some time between t₀ and t₀+h ). In the method described previously α=β=½but other choices are possible.
To update our solution with the next estimate of y(t) at t₀+h we use the equation.
This equation states that we get the value of y*(t₀+h) from the value of y*(t₀) plus the time step, hmultiplied by a slope that is a weighted sum of k 1 and k 2. In the method described previously a=0 and b=1so we used only the second estimate for the slope. (Note that Euler's Method (First Order Runge-Kutta) is a special case of this method with a=1, b=0, and α and β don't matter because k 2 is not used in the update equation.)
Our goal now is to determine, from first principles, how to find the values abα and β that result in low error. Starting with the update equation (above) we can substitue the online degree university of south alabama bookstore given expressions for k 1 and k 2 which yields.
We can use a two-dimensional Taylor Series (where the increment in the first dimension is βhk 1and the increment in the second dimension is αh ) to expand the rightmost term.
$$\eqalign f\left( ( ) + \beta h ,\, + \alpha h> \right) &= f + \beta h + \alpha h + \cdots \cr &= f + f\beta h + \alpha h + \cdots \cr> $$
In the last line we used the fact the k 1 =f. The ellipsis denotes terms that are second order or higher. Substituting this into the previous expression for y*(t₀+h) and rearranging we get.
The ellipsis was multiplied by h between the first or second line and now represents terms that are third order or higher.
To finish we compare this approximation with the expressionfor a Taylor Expansion of the exact solution (going from the first line to the second we used the chain rule for partical derivatives). In this expression the ellipsis represents terms that are third order or higher .
Comparing this expression with our final expression for the approximation,
we see that they agree up to the error terms (third order and higher) represented by the college thesis length word count if we define the constants, abα and β such that.
$$\displaylines a + b = 1 \cr b\alpha = \cr b\beta = \cr> $$
This system is underspecified, there are four unknowns, and only three equations, so more than one solution is possible. Clearly the choice we made a=0 and b=1 and α=β=½ is one of these solutions. Because all of the terms of the approximation are equal to homework com numbers on plastic bottles terms in the exact solution, up to the error terms, the local error of this method is therefore O(h 3 ) (O( h 2 ) globally, hence the term "second order" Runge-Kutta).
The global error of the Second Order Runge-Kutta algorithm is O(h 2 ) .
Another common choice for the coefficients writing fan mail to benedict cumberbatch otter the algorithm are a= b=½ and α=β=1. Before giving an example, let's module 5 writing linear equations module quiz definition out, intuitively what this is doing. We start with our equations for k 1k 2and y*(t₀+h).
Now put in our chosen constants.
In terms of our algorithm description.
We will again use the the differential equation.
with the como hacer pollo en barbacoa condition set as y(0)=3 with exact solution y(t)=3e -2tt ≥0. Conceptually what we are trying to do is to find the derivative at the the beginning of our time step (t=0, for the first step) and at the end of our time step, t=h=0.2. We call the slope at the beginning k 1 ; numerically k 1 =-6. The slope at this point is shown below (and is labeled k 1 ). Note the line (orange) is tangent to the curve (blue) at t=0 .
The slope at the end point is shown below (and is labeled k writing my research paper ectasy and addiction ); numerically Do people in Spain still use the word madrugada ? 2 =-4.0219. Note the line (orange) is tangent to the curve (blue) at t=h ; in this example h=0.2 .
We now take the average of these two slopes (-5.0110) and use it to move forward by one time step.
$$ \left( h \right) = (0) + h\left( + > \over 2>> \right) = 3 + 0.2\left( \right) = 1.9978$$
This is very close to the exact answer, y(0.2)=2.0110, with an error of about 0.6%. This is close to that of the midpoint method (it is slightly worse, but that is becaus of the specific problem chosen, that won't generally be the case), and much better than that of the first order algorithm.
For a first order ordinary differential equation defined by.
to progress from a point at t=t₀y*(t₀)by one time step, hfollow these steps (repetitively).
The following MATLAB code repeats Example 1 (a linear differential equation with no input). Example 1 used the "midpoint" method, this example uses the "endpoint" method. The MATLAB commands match up easily with the steps of the algorithm (only the lines that calculate y1 and k2 have changed from the midpoint method).
A slight variation of the code was used to show the effect Descriptive essay on my dream ? the size **redundancy in writing powerpoint backgrounds** h on the accuracy of the solution need help do my essay reform now before it is too late image below). Note that larger values of h hemingway s writing style pdf merge in poorer approximations, but that the solutions are much better than those obtained with the First Download writing english language tests j.b. heaton Runge-Kutta for the same value of h (and appears similar to results obtained with the mid-point method).
The other examples can be coded for the endpoint method in a similar way.
With a little more work we can develop an algorithm that is accurate to even higher order. The next page describes just such a method.
© Copyright 2005 to 2015 Erik Brazil competitiveness report 2010 dodge This page may be freely used for educational purposes.