home
up

My big title

John Doe

Spring 2018   Compiled on February 26, 2018 at 10:15am

Contents

Chapter 1
Introduction

This is main chapter. Here is a nice image

PIC

1.1 some math

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante. Donec ullamcorper, felis non sodales commodo, lectus velit ultrices augue, a dignissim nibh lectus placerat pede. Vivamus nunc nunc, molestie ut, ultricies vel, semper in, velit. Ut porttitor. Praesent in sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis fringilla tristique neque. Sed interdum libero ut metus. Pellentesque placerat. Nam rutrum augue a leo. Morbi sed elit sit amet ante lobortis sollicitudin. Praesent blandit blandit mauris. Praesent lectus tellus, aliquet aliquam, luctus a, egestas a, turpis. Mauris lacinia lorem sit amet ipsum. Nunc quis urna dictum turpis accumsan semper. 

Theorem 1 (Residue Theorem) Let f be analytic in the region G except for the isolated singularities a1,a2,,am. If γ is a closed rectifiable curve in G which does not pass through any of the points ak and if γ 0 in G, then

1 2πiγf = k=1mn(γ;a k)Res(f;ak).

1.1.1 this is a subsection

Here is some code in minipage

1%check if we converged or not 
2if k>opt.MAX_ITER || gradientNormTol(k)<=opt.gradientNormTol ... 
3|| (k>1 && levelSets(k)>levelSets(k1))% check for getting worst 
4   keepRunning = false; 
5else 
6  .... 
7end

Here is example using listings

1%Evaluate J(u) at u 
2function f = objectiveFunc(u) 
3 u=u(:); 
4 N = size(u,1); 
5 f = 0; 
6 for i = 1:N
7     f  = f + 100*(u(i+1)u(i)^2)^2 + (1u(i))^2; 
8 end 
9end

This is subsubsection with images

These two images should be side by side


PIC

Figure 1.1: Contour J(u)
PIC
Figure 1.2: Zooming on J(u)

Chapter 2
This is a new chapter

Here is some verbatim

K>> gradientNormTol(end-6:end)
....
          16.1440020280613
           17.487837406306
           16.092991548592
          17.4442963174089

2.1 This is a section for more math

2.1.1 problem 1

problem Transform the following problem or system to set of first order ODE t2x + tx + t2 1x = 0

solution Since this is second order ODE, we need two state variables, say x1,x

Let x1 = x,x2 = x, hence

x1 = x x2 = x take derivative x1 = x x2 = x replace RHS x1 = x2 x2 = x t t21x t = x2 t t21x1 t

Hence the two first order ODE’s are (now coupled)

x1 = x 2 x2 = x2 t t2 1x1 t

The matrix form of the above is

x = Ax x1 x2 = 0 1 t21 t 1 t x1 x2

2.1.2 Example on page 500, textbook (Edwards&Penny, 3rd edition)

problem This problem was solved in textbook using matrix exponential. Here is solved using the fundamental matrix only. Use the method of variation of parameters to solve x = Ax + f t.

A = 4 2 3 1 f̄ t = 15 4 te2t x̄ 0 = 7 3

Solution

The homogeneous solution was found in the book as

x̄h = c1 1 2 e2t+c 2 2 1 e5t

Following scalar case, the guess would be x̄p = b̄ + āte2t but since e2t is in the homogeneous, we have to adjust to be x̄p = b̄t + āt2 e2t + c̄e5t. Notice we had to add c̄e5t, else it will not work if we just guessed x̄p = b̄t + āt2 e2t based on what we would do in scalar case, we will find we get ā = b̄ = 0. This seems to be a trial and error stage and one just have to try to find out. This is why undermined coefficients for systems is not as easy to use as with scalar case. Hence

x̄p = b̄t + āt2 e2t + c̄e5t

Now we plug-in this back into the ODE and solve for ā,b̄,c̄. But an easier method is to use Variation of parameters. The fundamental matrix is

Φ = x̄1x̄2 = e2t 2e5t 2e2t e5t

And

Φ1 = e5t 2e2t 2e5t e2t T Φ = e5t 2e5t 2e2t e2t e3t + 4e3t = 1 5 e2t 2e2t 2e5t e5t

Hence using

x̄p = ΦΦ1f̄ tdt = 1 5Φ e2t 2e2t 2e5t e5t 15te2t 4te2t dt = 1 5Φ 23t 26te7t dt

The integral of 23tdt = 23 2 t2 and 26te7tdt = 26 49e7t 7t + 1 (using integration by parts) hence the above simplifies to

x̄p = Φ 23 10 t2 26 245e7t + 26 35te7t = e2t 2e5t 2e2t e5t 23 10 t2 26 245e7t + 26 35te7t = 52 245e2t + 52 35te2t 23 10t2e2t 26 245e2t + 26 35te2t + 23 5 t2e2t = 1 490e2t 1127t2 + 728t + 104 1 245e2t 1127t2 + 182t + 26

Hence the complete solution is

x̄ = x̄h + x̄p = c1 1 2 e2t + c 2 2 1 e5t + 1 490e2t 1127t2 + 728t + 104 1 245e2t 1127t2 + 182t + 26

To find the constants, we apply initial conditions. At t = 0

7 3 = c1 1 2 + c2 2 1 + 52 245 26 245 c1 1 2 + c2 2 1 = 7 3 52 245 26 245 1 2 2 1 c1 c2 = 1663 245 709 245 12 0 5 c1 c2 = 1663 245 807 49

Hence 5c2 = 807 49 or c2 = 807 245 and c1 + 2c2 = 1663 245 , hence c1 = 1663 245 2 807 245 = 1 5. Therefore the solution becomes

x̄ = 1 5 1 2 e2t+807 245 2 1 e5t+ 1 490e2t 1127t2 + 728t + 104 1 245e2t 1127t2 + 182t + 26