First, we identify the property of periodic functions, as shown on p9-2 of the notes, equation (1)
(1.0)
So for , the following determines the smallest period.
(1.1)
We then add to see a final expression that will be equal to
(1.2)
We then pull out a term that leaves an x plus a number (our period) inside the trigonometric function, cosine.
(1.3)
This means the smallest period is .
For , the following determines the smallest period.
(1.4)
We then add to see a final expression that will be equal to
(1.5)
We then pull out a term that leaves an x plus a number (our period) inside the trigonometric function, cosine.
(1.6)
This means the smallest period is , just as for its cosine equivalent.
From the notes (page 9-5, (1)), it can be stated that where is the period. Both of these functions have as their period. If we put in 1 for n, and for , the period simplifies to simply .
As for the constant , a constant is, almost by definition, a periodic function. The property of periodic functions as referenced in (1.0) supports this.
(1.0)
For a function of f that is a constant, x is not a factor effecting its value. This means, no matter what is added to x, the function will return the same constant number. This added value can just as well be , and thus, is a periodic function with period .
Kreyszig pg 491 pbs. 11,12 Is the given function odd or even or neither even nor odd? Show details of your work.
11)
12) -----
Continued)Find the Fourier series expansion for on p.9-8 as follows:
1. Develop the Fourier series expansion of
Plot and the truncated Fourier series
dsfawf
for n=0,1. Observe the values of at the points of discontinuities, and the Gibbs phenomenon. Transform the variable so to obtain the Fourier series expansion of .
Hint: is an even function; what would become of the coefficients ?
2. Do the same as above, but using to obtain the Fourier series expansion of ; compare to the result obtained above.
Hint: Transform into an odd function, and expand this odd function into Fourier series; observe the coefficients of this series.
The preceding function is an even function. Even functions are functions where . Odd functions on the other hand are functions where . The Fourier series of even and odd functions can be found more easily than the Fourier series of a function that is neither even nor odd. Normal Fourier series contain both sine and cosine terms. Because of the nature of even functions, the coefficient of all sine terms in their series is zero. Likewise, all cosine terms in odd functions have a coefficient of zero. Therefore its Fourier series expansion will be of the form:
(2.1)
Where:
(2.2)
And
(2.3)
To get the constant term of the expansion, equation (2.0) will be substituted into equation (2.2) with L=1:
(2.4)
To get the coefficients of the rest of the terms in the expansion, equation (2.0) will be substituted into equation (2.3) with L=1:
(2.5)
Simplifying, this yields:
(2.6)
Therefore, the Fourier expansion of f(x) is:
(2.7)
Part 2: K 2011 p.491 pb. 12
(2.8)
The preceding function is an even function. Therefore, equations (2.1)-(2.3) are applicable.
To get the constant term of the expansion, equation (2.8) will be substituted into equation (2.2) with L=1:
(2.9)
To get the coefficients of the rest of the terms in the expansion, equation (2.0) will be substituted into equation (2.3) with L=1:
(2.10)
Simplifying, this yields:
(2.11)
Therefore, the Fourier expansion of f(x) is:
(2.12)
Part 3
The Fourier series expansion of the function f(x) in Figure 1 can be found in one of two ways. The first way involves transforming x in the following way:
(2.13)
The resulting function is now an even function that alternates between the constant value A and zero and has period 4. Using the same methods used above, the Fourier series of the function can be found.
The constant coefficient of the series is found by:
(2.14)
Note that because the function is discontinuous at the midpoint, the integral must be split into two different integrals.
The coefficients of the cosine terms of the series can be found by:
(2.15)
Therefore, the Fourier series for the transformed function is:
(2.16)
Through a change in variables, the Fourier series of the original function, f(x), can be found:
(2.17)
The following figure shows a plot of with its truncated Fourier series for n=0,1.
Figure 2
Figure 3 shows the same plot with more values of n:
Note that all plots assume that A=1.
It should be noted that the accuracy of the expansion increases with an increase in the number of terms in the expansion. Also, there is strong fluctuation at points of discontinuity. These fluctuations are apparent even at high values of n, but they decrease in size and move closer to the points of discontinuity. This is a property of Fourier series known as the Gibbs phenomenon.
The other method of developing the Fourier series is to transform the function into an odd function. This can be done by transforming both the independent variable and overall function as follows:
(2.18)
(2.19)
An odd function has a Fourier series expansion of the form:
(2.20)
Where:
(2.21)
Applying this to the transformed function, with L=2:
(2.22)
The Fourier series is therefore:
(2.23)
(2.24)
(2.25)
The following figure shows a plot of with its truncated Fourier series for n=0,1.
Figure 4
Note that all plots assume A=1.
The accuracy of the expansion as shown on the plot is expected given the low number of terms used in the expansion. As Figure 3 shows, if the number of terms used to form the plot in Figure 4 is increased, the accuracy of the expansion will greatly increase (but more slowly at points of discontinuity because of the Gibbs phenomenon). This level of accuracy is shown in Figure 5, which contains the expansion to 100 and 200 terms.
Consider the L2-ODE-CC (5) p7b-7 with the window function f(x) p.9-8 as excitation:
(4.0)
and the initial conditions
(4.1)
1. Find such that:
(4.2)
with the same initial conditions (4.1).
Plot for n=2,4,8, for x in [0,10].
2.Use the matlab command ode45 to integrate the L2-ODE-CC, and plot the numerical solution to compare with the analytical solution. Level 1:n=0,1
Continuation of R4.2, R4.3, R4.4. R4.2,p.7c-26:
For each value of n=3,5,9, redisplay the expressions for the 3 functions , and plot these 3 functions separately over the interval .
Exact solution:
Redisplay the expressions for
Superimpose each of the above plots with that of the exact solution.
R4.3,p.7c-28:
Level 1: Understand and run the TA's code to produce a similar plot, but over a larger interval [0,10]. Do zoom-in plots about points and comment on the accuracy of different approximations. R4.4,p.7c-29:
Level 1: Understand and run the TA's code to produce a similar plot, but over a larger interval [0.9,10], and for n=4,7. Do zoom-in plots about x=1,1.5,2,2.5 and comments on the accuracy of the approximations.
In order to find the overall solution for the L2-ODE-CC corresponding to the Taylor series expansion of the sine function, both the homogenous and particular solutions must be found. The homogenous equation can be found through this method:
(5.0)
(5.1)
(5.2)
Next, the excitation must be expanded to the desired n. The following shows the excitation expanded to n=3, 5, and 9:
(5.3)
(5.4)
(5.5)
Next, the particular solution must be found. The particular solution will be of the form:
(5.6)
Using the derivation discussed in R4.1, a matrix equation in the form Ak = d can be found, where k is the matrix containing the coefficients of the particular solution and d is the matrix containing the coefficients of each power of x in the expansion of the excitation. The general formula for A is:
(5.7)
n=3
The matrix A is found as:
(5.8)
Therefore, the matrix equation is:
(5.9)
(5.10)
Therefore the particular solution is:
(5.11)
And the overall solution for n=3 is:
(5.12)
Using the initial conditions:
&
(5.13)
Solving yields & . Therefore the overall solution is:
(5.14)
n=5
The matrix equation is:
Therefore the particular solution is:
(5.15)
And the overall solution for n=5 is:
(5.16)
Using the initial conditions:
Solving yields . Therefore the overall solution is:
(5.18)
n=9
The matrix equation is:
Therefore the particular solution is:
(5.19)
And the overall solution for n=9 is:
(5.20)
Using the initial conditions:
(5.21)
Solving yields . Therefore the overall solution is:
(5.22)
The following plot shows the overall solution of the ODE at n=3,5,9 over the domain [0,4π]:
Figure 4.2-2
The near perfect overlap between all three graphs shows that the approximations converge quickly for very low values of n.
Next, the exact ODE will be calculated to find the accuracy of the above approximations. The homogeneous solution is the same as the homogeneous solution above, only with different coefficients. The particular solution will be in the form:
(5.23)
(5.24)
(5.25)
Plugging these values into the ODE:
(5.26)
Separating sine and cosine terms yield two linear equations which can be used to solve for the unknown coefficients:
&
(5.27)
Solving these equations yield K = 0.3 and M = 0.1.
(5.28)
Therefore the exact overall solution is:
(5.29)
(5.30)
Using the initial conditions yield the equations:
&
(5.31)
Solving these two equations yield . Therefore the exact overall solution is:
(5.32)
The following figure shows the plot of the exact solution over the plot in Fig. 4.2-2:
Figure 4.2-3
In this problem we are given the TA's Matlab code but must change the interval on which we are plotting. This give us the following code:
x=-1:0.01:1.5;
y=log(1+x);
x1=-1.5:0.01:1.5;
y1=zeros(1,301);
for i=1:4
for j=1:301
y1(j)=y1(j)-((-x1(j))^i)/i;
end
end
y2=zeros(1,301);
for i=1:7
for j=1:301
y2(j)=y2(j)-((-x1(j))^i)/i;
end
end
y3=zeros(1,301);
for i=1:11
for j=1:301
y3(j)=y3(j)-((-x1(j))^i)/i;
end
end
y4=zeros(1,301);
for i=1:16
for j=1:301
y4(j)=y4(j)-((-x1(j))^i)/i;
end
end
h=plot(x,y);
orange = [1 0.5 0.2];
set(h,'Color',orange);
hold on;
plot(x1,y1,'r');
plot(x1,y2,'g');
plot(x1,y3,'b');
plot(x1,y4,'c');
axis([0 10 -10 10]);
legend('log(1+x)','T_4','T_7','T_1_1','T_1_6');
grid on;
Zooming at -0.5
This graph shows fairly accurate results with slight deviation, with largest deviation occurring at the T4 term.
Zooming about point 0
In this graph, only T16 shows, thus meaning that it is the best approximation.
Zooming at 0.5
All lines appear to be fairly good approximations with the exception of T4 which deviates from the rest.
Since the three lines are all stacked, both n=4 and n=7 are good approximations at x=1.
Zooming at 1.5
Again, since the three lines are all stacked, both n=4 and n=7 are good approximations at x=1.5.
Zooming at 2
Here, both can again be said to be good approximations, however, you can see some very slight deviation in n=4.
Zooming at 2.5
In this plot, n=7 is still a pretty strong approximation, while n=4 is beginning to deviate at a fairly rapid rate and thus will soon be a poor approximation.
1)Simplify the 1st term on the lhs of (2) p.10-4.
2)Simplify the 2nd term , and combine with the simplified 1st term.
3)Finally, add the 3rd term
4)Find the final expression for
To find the particular solution of an ODE we can use the method of undetermined coefficients. In report 3 we used the table 2.1 below to find the standard form of the particular solution given the form of the excitation .
Table 2.1
So the general form of the particular solution is:
(6.2)
Task 1 asks to simplify they first term of the given ODE which is . This is done by taking the second derivative of and plugging it into equation 6.1
(6.3)
simplifies to:
(6.4)
Now we must do the same for the second term .
(6.5)
(6.6)
Add the second term to the first to continue building the original ODE (equation 6.1).
(6.7)
(6.8)
Finally add the third term to the other two to have the lhs of the ODE 6.1