home
up

My big title

John Doe

Spring 2018   Compiled on February 26, 2018 at 3:14am

Contents

1 Introduction
 1.1 some math
  1.1.1 this is a subsection
2 This is a new chapter
 2.1 This is a section for more math
  2.1.1 problem 1
  2.1.2 Example on page 500, textbook (Edwards&Penny, 3rd edition)

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  ∫     ∑m
2πi-  f =     n(γ;ak)Res(f ;ak ).
     γ    k=1

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(k                       −1))% 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 + (1                                                     −u(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 − 1)x = 0

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

Let x1 = x,x2 = x′ , hence

       }               ′    ′}  replaceRHS               x′ = x
x1 = x′  take d−er→ivative  x1′ = x′′     − →             ′  (t2−11)x  2       (t2−1)x
x2 = x               x 2 = x              x′2 = − xt-− ---t-- = − xt2−  ---t--1

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

pict

The matrix form of the above is

pict

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)  .

pict

Solution

The homogeneous solution was found in the book as

       (  1 )         (2)
¯xh = c1      e− 2t + c2    e5t
         − 2           1

Following scalar case, the guess would be      (¯     ) −2t
x¯p =  b + ¯at e  but since  −2t
e  is in the homogeneous, we have to adjust to be      (       )
¯xp =  ¯bt+ ¯at2 e− 2t + ¯ce5t  . Notice we had to add ¯ce5t  , else it will not work if we just guessed      (       )
¯xp =  ¯bt+ ¯at2 e−2t   based on what we would do in scalar case, we will find we get ¯a = ¯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

    (¯     2)  −2t    5t
¯xp = bt + ¯at  e   + ¯ce

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

pict

And

       (   5t     − 2t)T    (   5t      5t)
          e    2e            e    − 2e        (            )
  −1   -−-2e5t--e−2t----  --2e−2t--e−2t--   1-   e2t   − 2e2t
Φ   =         |Φ |       =    e3t + 4e3t   = 5  2e− 5t  e−5t

Hence using

pict

The integral of ∫
  − 23tdt = −223t2  and ∫
  − 26te−7tdt = 2469e−7t(7t+ 1)  (using integration by parts) hence the above simplifies to

pict

Hence the complete solution is

pict

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

pict

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

      (   )           (  )     (        (                    ))
    1-  1    −2t  807-  2  5t    4190e−2t − 1127t2 + 728t+ 104
¯x = 5  − 2  e   + 245   1 e  +     1-e−2t(1127t2 + 182t+ 26)
                                   245