• Keine Ergebnisse gefunden

2.4 The sensitivity of a functional

2.4.2 Quadratic functional

etc.. The integral and the derivative operator can be permuted if the function y is a sufficiently smooth function (see [De], Chapter 8.6). Thus we obtain the sensitivities of the total cell population by the sensitivities of the function y.

2.4.2 Quadratic functional

An example for a quadratic functional is the cost functional which is given by hq(y(t, x), yd(t)) = ν and wherey(t, x) describes the state solution onQandyd(t) describes the desired time-dependent total cell population witht∈[0, T]. Let (u, µ)∈Uad×D be fixed than we write the output function with

J(u, µ) := hq(y(t, x;u, µ), yd(t)) = ν

The sensitivity of first order of J relating to a parameterγ is given by

provided that y is sufficiently smooth (see [De], Chapter 8.6).

3 The finite differences method

In this chapter the finite difference method is presented which is used to solve the state system (2.3). A detailed explanation is found in [Be], Chapter 4. Here, only a short summary is presented. The main part of this chapter is the modification of this method for solving the sensitivity equations.

3.1 Solution of the state system

The following method for solving the state system is based on discretization with finite differences. For this, we reshape the state system (2.3) by discretization in the spacexto an ordinary differential equation and after this by discretization in the time t by theθ-method to an explicit (θ = 0), implicit (θ= 1) or to a mixed (θ ∈(0,1)) system. The solution of the system is an approximate solution for y inQ.

We start on the domain [0, T]×[x, x] and define a grid. We choose ∆x > 0,

∆t > 0 as step sizes. Let Nx, K ∈N and define the grid points by xi =x+i∆x for i = 0, . . . , Nx and tk = k∆t for k = 0, . . . , K. We receive the grid points x= x0 < x1 < . . . < xNx =x and 0 =t0 < t1 < . . . < tK =T. In the following we denote by

ykiy(tk, xi) fori= 0, . . . , Nx and k = 0, . . . , K

an approximation of the exact solutiony(tk, xi) with tk ∈[0, T] and xi ∈[x, x].

For the boundary and initial conditions follows

yk0 =g (k = 0, . . . , K), yi0 =y0(xi) (i= 0, . . . , Nx).

Now the idea is to replace the partial derivatives by finite differences. Here, it is important that we choose good quotients for the derivatives. In Figure 3.1 is a pattern of the grid. The red lines are the boundary and initial conditions. The hyperbolic partial differential equation describes a wave from left to right. There-fore the numeric method has to present this situation and hence the information flow goes from left to right. There exists a numerical forward flow.

3 The finite differences method

Figure 3.1: Grid for the finite difference method applied on the state system. The flow goes from the left side to right and from bottom to top.

We use either a forward or backward difference quotient for the time t and for the space x. There are four options which are shown in Figure 3.2.

Figure 3.2: Difference stars for the finite difference method. The middle grid point is (tk, xi). The neighbour points left (tk, xi−1), right (tk, xi+1), top (tk+1, xi) and down (tk−1, xi). The arrows starting from the grid points of the old time step and go to the points with new time step.

To receive a forward flow, we have to source the information from the desired direction. Thus from right.

Option a) is the forward-time backward-space scheme. The arrows go up and right. This provides a forward flow and therefore the scheme can be accepted.

Option b) is the backward-time backward-space scheme and c) the forward-time forward-space scheme. In both difference stars the arrows go to the left side. The schemes generate a backward flow and we can not use them. The last option d) describes the backward-time forward-space scheme. The arrows go up and right. Again the result is a forward flow. Hence, we have two possibilities for the choice of the finite differences. In the following step the last scheme d) is used.

Discretization with respect to maturity x

The forward difference quotient in direction x on (t, xi) gives an approximation for the first derivative of the function y with respect to x at these points. This

3.1 Solution of the state system

quotient is given by

∂xy(t, xi) = y(t, xi+1)−y(t, xi)

∆x +O(∆x) t ∈(0, T), i= 0, . . . , Nx−1 (see [Ar], Chapter 10.4). Inserted into the state system (2.3) a system of ordinary differential equations is obtained:

∂ty(t, xi) + y(t,xi+1∆x)−y(t,xi) ≈ (β−α(t, u;µ))y(t, xi), t∈(0, T),

i= 0, . . . , Nx−1

y(t, x0) = g, t ∈(0, T)

y(t0, xi) = y0(xi), i= 0, . . . , Nx

(3.1) Discretization with respect to time t

The backward difference quotient in direction t on (tk, xi) gives an approxima-tion for the first derivative of the funcapproxima-tiony with respect to t on this point. The quotient is given by

∂ty(tk, xi) = y(tk, xi)−y(tk−1, xi)

∆t +O(∆t) ≈ yikyk−1i

∆t , k = 1, . . . , K (see in [Ar], Chapter 10.4). In the state system (2.3) we also have the time-dependent function α(t, u;µ). The function α, evaluated at the grid points is given by

αk(u;µ) := α(tk, u;µ), k = 0, . . . , K.

Furthermore, letθ ∈[0,1]. By replacing the derivative ofy with respect totwith the difference quotient and α(tk, u;µ) with αk(u, µ) and applying the θ-method in the point (tk+1, xi−1) on system (3.1) we obtain the difference equation

yi−1k+1yi−1k

∆t = θyik+1yi−1k+1

∆x + (β−αk+1(u;µ))yk+1i−1

!

+ (1−θ)yikyi−1k

∆x + (β−αk(u;µ))yi−1k

!!

(3.2) for i = 1, . . . , Nx and k = 0, . . . , K −1. For θ = 0 we have the explicit Euler method, and forθ= 1 the implicit Euler. If we consider the difference stars from Figure 3.2 and the equation (3.2), we see forθ = 1 we have the difference star d) and forθ = 0 is present the difference star c). According to the previous thoughts we need to choose θ6= 0.

3 The finite differences method The next aim is to get an equation with vectors and not only for individual points. The vectors depend on k and each component of these vectors contain the approximative solution for any i, i = 1, . . . , Nx. Hence, we want to have that yki is the component in the k th vector on the position i. Therefore, let for k = 1, . . . , K the vector yk ∈ RNx be defined by yk := (y1k, . . . , ykNx)T. Further,

By incorporating the boundary conditions yk0 = g in (3.3), we get a shift with (y0k, . . . , yNk

x−1)T = BNxyk+g e1, where e1 ∈ RNx denotes the first unit vector.

The component ykNx has been eliminated. Thus, the equation can be formulated simultaneously for all points in space for every k= 1, . . . , K with: The result is that we can compute yk+1 by yk. As initial condition we use the start vector

y0 = (y0(x1), . . . , y0(xNx))T =:η0. (3.5) It follows an inhomogeneous system of linear equations:

LkI(u, µ)yk+1 = LkE(u, µ)yk+ ∆tzk(u, µ) k = 0, . . . , K−1

3.2 Solution of a sensitivity equation of first order