Basic Finance

Chris Tsokos , Rebecca Wooten , in The Joy of Finite Mathematics, 2016

Exercises

Critical Thinking

11.4.1

Distinguish between annual interest rate , periodic interest rate, and effective interest rate.

11.4.2

Distinguish between sinking fund and amortization.

11.4.3

Distinguish between renting, leasing, and owning.

Basic Problems

11.4.4.

Find the effective interest rates when interest is compounded periodically given:

(a)

r = 0.24 , n = 12

(b)

r = 0.12 , n = 12

(c)

r = 0.24 , n = 24

(d)

r = 0.12 , n = 24

11.4.5.

Find the effective interest rates when interest is compounded continuously given:

(a)

r = 0.24

(b)

r = 0.12

(c)

r = 0.06

(d)

r = 0.01

11.4.6.

Compare the effective interest rates compounded monthly versus compounded continuously given:

(a)

r = 0.27

(b)

r = 0.18

(c)

r = 0.16

(d)

r = 0.01

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128029671000115

Computer Algorithms

Conor Ryan , in Encyclopedia of Physical Science and Technology (Third Edition), 2003

I Algorithms and Programs

An algorithm can take many forms of detail. Often the level of detail required depends on the target of the algorithm. For example, if one were to describe an algorithm on how to make a cup of tea to a human, one could use a relatively coarse (high) level of detail. This is because it is reasonable to assume that the human in question can fill in any gaps in the instructions, and also will be able to carry out certain tasks without further instructions, e.g., if the human is required to get a cup from a cupboard, it would be fair to assume that he/she knows how to do this without elaboration on the task.

On the other hand, a program is generally a computer program and consists of a set of instructions at a very fine level of detail. A fine level of detail is required because computer programs are always written in a particular language, e.g., Basic, C++, Pascal, etc. Furthermore, every step in a task must be specified, because no background knowledge can be assumed. An often used distinction is that an algorithm specifies what a process is doing, while a program specifies how the process should be done. The truth is probably somewhere between these two extremes—while an algorithm should be a clear statement of what a process is doing, it is often useful to have some level of specification of functionality in an algorithm.

It is not very natural for humans to describe tasks with the kind of level of detail usually demanded by a programming language. It is often more natural to think in a top-down manner, that is, describe the problem in a high level manner, and then rewrite it in more detail, or even in a specific computer language. This can often help the person concerned to get a problem clear in his/her own mind, before committing it to computer. Much of this chapter is concerned with the process of refinement. Refinement of algorithms is (usually) an iterative process, where one begins with a very high level—that is, the what—and by repeatedly modifying the algorithm by adding more detail (the how) brings the algorithm closer and closer to being code, until the final coding of the algorithm becomes a very clear task. Ideally, when one is writing a program, one should not have to figure out any logic problems; all of these should be taken care of in the algorithm.

Algorithms are not just used as an aid for programmers. They are also a very convenient way to describe what a task does, to help people conceptualize it at a high level, without having to go through masses of computer code line by line.

Consider the following problem, which we will state first in English:

Mary intends to open a bank account with an initial deposit of $100. She intends to deposit an additional $100 into this account on the first day of each of the next 19 months for a total of 20 deposits (including the initial deposit). The account pays interest at a rate of 5% per annum compounded monthly. Her initial deposit is also on the first day of the month. Mary would like to know what the balance in her account will be at the end of the 20 months in which she will be making a deposit.

In order to solve this problem, we need to know how much interest is earned each month. Since the annual interest rate 5%, the monthly interest rate is 5/12%. Consequently, the balance of the end of a month is

(initial balance   + interest)

  =   (initial balance) * (1   +   5/1200)

  =   241/240 (initial balance)

Having performed this analysis, we can proceed to compute the balance at the end of each month using the following steps:

1.

Let balance denote the current balance. The starting balance is $100, so set balance   =   100.

2.

The balance at the end of the month is 241/240 * balance. Update balance.

3.

If 20 months have not elapsed, then add 100 to balance to reflect the deposit for the next month. Go to step 2. Otherwise, we are done.

This, then, is an algorithm for calculating the monthly balances. To refine the algorithm further, we must consider what kind of machine we wish to implement our algorithm on. Suppose that we have to compute the monthly balances using a computing device that cannot store the computational steps and associated data. A nonprogrammable calculator is one such device. The above steps a will translate into the following process:

1.

Turn the calculator on.

2.

Enter the initial balance as the number 100.

3.

Multiply by 241 and then divide by 240.

4.

Note the result down as a monthly balance.

5.

If the number of monthly balances noted down is 20, then stop.

6.

Otherwise, add 100 to the previous result.

7.

Go to step 3.

If we tried this process on an electronic calculator, we would notice that the total time spent is not determined by the speed of the calculator. Rather, it is determined by how fast we can enter the required numbers and operators (add, multiply, etc.) and how fast we can copy the monthly balances. Even if the calculator could perform a billion computations per second, we would not be able to solve the above problem any faster. When a stored-program computing device is used, the above instructions need be entered into the computer only once. The computer can then sequence through these instructions at its own speed. Since the instructions are entered only once (rather than 20 times), we get almost a 20 fold speed up in the computation. If the balance for 1000 months is required, the speedup is by a factor of almost 1000. We have achieved this speedup without making our computing device any faster. We have simply cut down on the input work required by the slow human!

A different approach would have been to write program for the algorithm. The seven-step computational process stated above translates into the Basic program shown in Program 1.

PROGRAM 1

10 balance   =   100

20 month   =   1

30 balance   =   241 * balance/240

40 print month, ′$′; balance

50 if month   =   20 then stop 60 month   =   month   +   1

70 balance   =   balance   +   100

80 go to 30

PROGRAM 2: Pascal Program for Mary'sProblem

line program account (input, output)

1 {computer the account balance at the end of each month}

2 const InitialBalance  =   100;

3 MonthlyDeposit  =   100;

4 TotalMonths  =   20;

5 AnnualInterestRate  =   5;

6 var balance, interest, MonthlyRate: real

7 month:integer;

8 begin

9 MonthlyRate:   = AnnualInterest- Rate/1200;

10 balance:= InitialBalance;

11 writeln ('Month Balance');

12 for month:   =   1 to TotalMonths do

13 begin

14 interest:= balance * MonthlyRage;

15 balance:= balance  + interest;

16 writeln (month: 10, ' ', balance: 10: 2);

17 balance:= balance  + MonthlyDeposit;

18 end; of for

19 writeln;

18 end; of account

In Pascal, this takes the form shown in Program 2. Apart from the fact that these two programs have been written in different languages, they represent different programming styles. The Pascal program has been written in such a way as to permit one to make changes with ease. The number of months, interest rate, initial balance, and monthly additions are more easily changed into Pascal program.

Each of the three approaches is valid, and the one that should eventually be used will depend on the user. If the task only needs to be carried out occasionally, then a calculator would probably suffice, but if it is to be executed hundreds or thousands of times a day, then clearly one of the computer programs would be more suitable.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B0122274105008401

Engineering Economics

A. Kayode Coker , in Fortran Programs for Chemical Process Design, Analysis, and Simulation, 1995

Capitalized Cost

The capitalized cost, CK, of a piece of equipment of a fixed capital cost, CFC , having a finite life of n years and an annual interest rate, i, is defined by

(9.25) ( C K C FC ) ( 1 + i ) n = C K S

where S = salvage or scrap value

CK is in excess of CFC by an amount, which, when compounded at an annual interest rate, i, for n years, will have a future worth of CK less the salvage or scrap value, S. If the renewal cost of the equipment and the interest rate are constants at (CFC – S) and i, then CK is the amount of the capital required to replace the equipment in perpetuity.

Rearranging Equation 9-25 gives

(9.26) C K = [ C FC S ( 1 + i ) n ] [ ( 1 + i ) n ( 1 + i ) n 1 ]

or

(9.27) C K = ( C FC S . f d ) f K

where fd = discount factor

fK = the capitalized cost factor = ( 1 + i ) n / [ ( 1 + i ) n 1 ]

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780884152804500108

Modeling (Optional)

Gary Smith , in Essential Statistics, Regression, and Econometrics (Second Edition), 2015

The Miracle of Compounding

When Albert Einstein was asked the most important concept he had learned during his life, he immediately said "compounding." Not statistical mechanics. Not quantum theory. Not relativity. Compounding.

Suppose that you invest $1000   at a 10 percent annual interest rate. The first year, you earn $100 interest on your $1000 investment. Every year after that, you earn 10  percent interest on your $1000 and also earn interest on your interest, which is what makes compounding so powerful, bordering on the miraculous. Equation (11.7) shows that after 50   years of compound interest, your $1000 grows to $117,391:

Y t = ( 1 + g ) t Y 0 = ( 1 + 0.10 ) 50 $ 1000 = $ 117,391

A seemingly modest rate of return, compounded many times, turns a small investment into a fortune. The miracle of compounding applies to anything growing at a compound rate: population, income, prices.

Equation (11.7) can also be used to solve for the growth rate if we know the values of Y 0 and Y t . For example, a very concerned citizen wrote a letter to his local newspaper complaining that houses that sold for tens of thousands of dollars decades ago were now selling for hundreds of thousands of dollars: "That house can't be worth $400,000; my grandfather bought it for $40,000!" Suppose that a house sold for $40,000 in 1950 and for $400,000 in 2000. Equation (11.7) shows that this is a 4.7   percent annual rate of increase:

Y t = ( 1 + g ) t Y 0 = ( 1 + 0.047 ) 50 $ 40,000 = $ 400,000

If the letter writer had been told that home prices had increased by 4.7   percent a year, would he have been so flabbergasted?

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B978012803459000011X

Cash Flow Engineering, Interest Rate Forwards and Futures

Robert L. Kosowski , Salih N. Neftci , in Principles of Financial Engineering (Third Edition), 2015

Zero-Coupon Curve from Coupon Bonds

Traditional methods of calculating the yield curve involve obtaining a zero-coupon yield curve from arbitrary coupon bond prices. This procedure is somewhat outdated now, but it may still be useful in economies with newly developing financial markets. Also, the method is a good illustration of how synthetic asset creation can be used in yield curve construction. It is important to remember that all these calculations refer to default-free bonds.

Consider a 2-year coupon bond. The default-free bond carries an annual coupon of c percent and has a current price of P (t, t +2). The value at maturity is 100. Suppose we know the level of the current annual interest rate r t . 36 Then the portfolio

(3.95) { 100 c ( 1 + r t ) units of time t borrowing , and buying two - period coupon bond , P ( t , t + 2 ) }

will yield the cash flow equivalent to 1+c units of a two-period discount bond. Thus, we have

(3.96) P ( t , t + 2 ) 100 c 1 + r t = ( 100 ( 1 + c ) ) / ( 1 + y t 2 ) 2

If the coupon bond price P(t, t+2) and the 1-year interest rate r t are known, then the 2-year zero-coupon yield y t 2 can be calculated from this expression. Zero-coupon yields for other maturities can be calculated by forming similar synthetics for longer maturity zero-coupon bonds, recursively.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123869685000030

Applications of First Order Differential Equations

Martha L. Abell , James P. Braselton , in Introductory Differential Equations (Fifth Edition), 2018

A. Mathematics of Finance

Suppose that P dollars are invested in an account at an annual rate of r% compounded continuously. To find the balance of the account x ( t ) at time t, we must solve the initial value problem

d x / d t = r x , x ( 0 ) = P , for x = x ( t ) .

1.

Show that x ( t ) = P e r t .

2.

If $1000 is deposited into an account with an annual interest rate of 8% compounded continuously, what is the balance of the account at the end of 5, 10, 15, and 20 years?

If we allow additions or subtractions of sums of money from the account, the problem becomes more complicated. Suppose that an account like a savings account, home mortgage loan, student loan or car loan, has an initial balance of P dollars and r denotes the interest rate per compounding period. Let p ( t ) denote the money flow per unit time and δ = ln ( 1 + r ) . Then the balance of the account at time t, x ( t ) , satisfies the initial value problem 4

d x d t δ x = p ( t ) , x ( 0 ) = P .

3.

Show that the balance of the account at time t 0 is given by

x ( t 0 ) = P e δ t 0 + e δ t 0 0 t 0 p ( t ) e δ t d t

4.

Suppose that the initial balance of a student loan is $12,000 and that monthly payments are made in the amount of $130. If the annual interest rate, compounded monthly, is 9%, then P = 12 , 000 , p ( t ) = 130 , r = 0.09 / 12 = 0.0075 , and δ = ln ( I + r ) = ln ( 1.0075 ) .

(1)

Show that the balance of the loan at time t, in months, is given by

x ( t ) = 17398.3 5398.25 1.0075 t .

(2)

Graph x ( t ) on the interval [ 0 , 180 ] , corresponding to the loan balance for the first 15 years.

(3)

How long will it take to pay off the loan?

5.

Suppose that the initial balance of a home mortgage loan is $80,000 and that monthly payments are made in the amount of $599. If the annual interest rate, compounded monthly, is 8%, how long will it take to pay off the mortgage loan?

6.

Suppose that the initial balance of a home mortgage loan is $80,000 and that monthly payments are made in the amount of $599. If the annual interest rate, compounded monthly, is 8%, how long will it take to pay off the mortgage loan if the monthly payment is increased at an annual rate of 3%, which corresponds to a monthly increase of 1/4%?

7.

If an investor invests $250 per month in an account paying an annual interest rate of 10%, compounded monthly, how much will the investor have accumulated at the end of 10, 20, and 30 years?

8.

Suppose an investor begins by investing $250 per month in an account paying an annual interest rate of 10%, compounded monthly, and in addition increases the amount invested by 6% each year for an increase of 1/2% each month. How much will the investor have accumulated at the end of 10, 20, and 30 years?

9.

Suppose that a 25-year-old investor begins investing $250 per month in an account paying an annual interest rate of 10%, compounded monthly. If at the age of 35 the investor stops making monthly payments, what will be the account balance when the investor reaches 45, 55, and 65 years of age? Suppose that a 35-year-old friend begins investing $250 per month in an account paying an annual interest rate of 10%, compounded monthly, at the same time the first investor stops. Who has a larger investment at the age of 65?

10.

If you are given a choice between saving $150 a month beginning when you first start working and continuing until you retire, or saving $300 per month beginning 10 years after you first start working and continuing until you retire, which should you do to help ensure a financially secure retirement?

From Exercises 8 and 9, we see that consistent savings beginning at an early age can help assure that a large sum of money will accumulate by the age of retirement. How much money does a person need to have accumulated to help ensure a financially secure retirement? For example, corporate pension plans and social security generally provide a relatively small portion of living expenses, especially for those with above average incomes. In addition, inflation erodes the buying power of the dollar; large sums of money today will not necessarily be large sums of money tomorrow.

As an illustration, we see that if inflation were to average a modest 3% per year for the next 20 years and a person has living expenses of $20,000 annually, then after 20 years the person would have living expenses of $ 20 , 000 1.03 20 $ 36 , 122 .

Let t denote years and suppose that a person's after-tax income as a function of years is given by I ( t ) and E ( t ) represents living expenses. Here t = 0 might represent the year a person enters the work force. Generally, during working years, I ( t ) > E ( t ) ; during retirement years, when I ( t ) represents income from sources such as corporate pension plans and social security, I ( t ) < E ( t ) .

Suppose that an account has an initial balance of S 0 and the after-tax return on the account is r%. We assume that the amount deposited into the account each year is I ( t ) E ( t ) . What is the balance of the account at year t, S ( t ) ? S must satisfy the initial value problem

d S d t = r S ( t ) + I ( t ) E ( t ) , S ( 0 ) = S 0 .

11.

Show that the balance of the account at time t = t 0 is

S ( t 0 ) = e r t 0 ( S 0 + 0 t 0 ( I ( t ) E ( t ) ) e r t d t ) .

Assume that inflation averages an annual rate of i. Then, in terms of E ( 0 ) , E ( t ) = E ( 0 ) e i t . Similarly, during working years we assume that annual raises are received at an annual rate of j. Then, in terms of I ( 0 ) , I ( t ) = I ( 0 ) e j t . However, during retirement years, we assume that I ( t ) is given by a fixed sum F, such as a corporate pension or annuity, and a portion indexed to the inflation rate V, such as social security. Thus, during retirement years

I ( t ) = F + V e i ( t T ) ,

where T denotes the number of working years. Therefore,

I ( t ) = { I ( 0 ) e j t , 0 t T F + V e i ( t T ) , t > T .

12.

Suppose that a person has an initial income of I ( 0 ) = 20 , 000 and receives annual average raises of 5%, so that j = 0.05 and initial living expenses are E ( 0 ) = 18 , 000 . Further, we assume that inflation averages 3%, so that i = 0.03 , while the after tax return on the investment is 6%, so that r = 0.06 . Upon retirement after T years of work, we assume that the person receives a fixed pension equal to 20% of his living expenses at that time, so that

F = 0.2 18 , 000 e 0.03 T ,

while social security provides 30% of his living expenses at that time, so that

V = 0.3 18 , 000 e 0.03 T .

(1)

Find the smallest value of T so that the balance in the account is zero after 30 years of retirement. Sketch a graph of S for this value of T.

(2)

Find the smallest value of T so that the balance in the account is never zero. Sketch a graph of S for this value of T.

13.

What is the relationship between the results you obtained in Exercises 9 and 10 and that obtained in Exercise 12?

14.
(1)

How would you advise a person 22 years of age first entering the work force to prepare for a financially secure retirement?

(2)

How would you advise a person 50 years of age with no savings who hopes to retire at 65 years of age?

(3)

When should you start saving for retirement?

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128149485000033

Descriptive Methods

Ronald N. Forthofer , ... Mike Hernandez , in Biostatistics (Second Edition), 2007

3.6 Measures of Change over Time

To understand the change in the height of a child or the growth of population over time, we may plot the data against time. We look first for an overall pattern and then for deviations from that pattern. For certain phenomena the points follow a straight line, and for other phenomena the points are nonlinear. In this section, we examine two well-known patterns of growth: linear and exponential.

3.6.1 Linear Growth

Linear growth means that a variable increases by a fixed amount at each unit of time. The height of a child or the production of food supply may take this pattern. To describe this pattern, we write a mathematical model for the straight-line growth of variable y.

In this model, b is the increment by which y changes when t increases by one unit and a is the base value of y when t = 0.

Example 3.14

The stature-for-age growth chart of U.S. boys is shown in Figure 3.16 (NCHS) 2006. The growth pattern exhibits a roughly linear trend between ages 2 to 15 years. For a typical child (50th percentile) a is about 34 inches (at age 2) and b is roughly 2.5 inches. From this we can tell that the stature of a 12-year-old boy would be about 59 inches [= 34 + 2.5(10)], and the chart also shows this value. The chart also shows that the stature of boys varies more as they grow older.

Figure 3.16. Growth chart (stature-for-age) for U.S. boys, 2 to 20 years of age.

We will explore this linear growth model further in Chapter 13. Because no straight line usually passes exactly through all data points, we need to find a line that fits the points as well as possible. We will learn how to estimate the best fitting line from the data.

3.6.2 Geometric Growth

The population size of a community usually does not follow the linear growth model. The change in the population size over time in an area can simply be described as the number of people added or reduced between two time points. For comparison purposes, we can express the change as percent of the base population. If the time period is the same, the percent of change can be compared between populations. The percent of change from time 0 to time t in the population P is calculated by

P t - P 0 P 0 ( 100 ) = ( P t P 0 - 1 ) ( 100 ) .

For example, the U.S. population increased from 248,709,873 in 1990 to 281,421,906 in 2000, showing a 13.15 percent increase over a 10-year period.

Percent change indicates a degree of change, but it is not yet a "rate of change." Like other vital rates, a rate of change should express change as a relative change in population size per year. We need to convert the percent change into an annual rate. But we cannot simply take one-tenth of the percent change (arithmetic mean) as an annual growth rate. Equal degrees of growth do not produce equal successive absolute increments because they follow the principle of compounded interest. In other words, a constant rate of growth produces larger and larger absolute increments, simply because the base of total population steadily becomes larger. Therefore, the linear growth model would not apply to population growth.

If a population is growing at an annual rate of r, then the population at time 1 would be the base plus an incremental change — that is, (a + ar) or a(1 + r). If the population is subject to the same constant growth rate, the population at time t will be

Example 3.15

The geometric growth model fits well to the growth of money deposited at a bank with the interest added at the end of each year. Suppose $1000 is deposited and earns interest at an annual rate of 10 percent for 10 years. The amount in the account (y) at each anniversary date can be calculated by y = 1000(1 + 0.1)t, where t ranges from 1 to 10. Figure 3.17 shows the results. The money grew more than 100 percent because the interest was compounded annually.

Figure 3.17. Account value over time for $1000 earning an annual interest rate of 10 percent.

If one wants to have the $1000 to be tripled over the 10-year period, then what level of annual interest rate would be required? We can solve 3000 = 1000(1 + r)10 for r as follows:

r + 1 = exp ( ln ( 3 ) 10 ) = exp ( 1.09861 10 ) = 1.1161.

One needs to find a bank that offers an annual interest rate of 11.6 percent.

3.6.3 Exponential Growth

We know that population is changing continuously as births and deaths occur throughout the year. We want to find a model that describes the growth as a continuous process. This new model is the exponential growth model and it has the following form:

y = a e r t

where r is annual growth rate, e is a mathematic constant approximately equal to 2.71828, and a is the population at t = 0. Figure 3.18 graphically shows the exponential growth of a population of 10,000 at an annual growth rate of 5 percent over a 30-year period.

Figure 3.18. Increase of population of 10,000 at an annual rate of increase of 5 percent.

Relating to the bank interest rate example, this model assumes that the interest is compounded continuously.

Example 3.16

The U.S. population grew from 248,709,873 in 1990 to 281,421,906 in 2000. What would be an annual growth rate over the 10-year period? We can solve the following equation for r as follows:

281421906 = 24870987 e 10 r ln ( 281421906 / 248709873 ) = 10 r r = ( ln 28142906 / 248709873 10 ) = ( 0.1236 10 ) = 0.01236.

The U.S. population grew at the annual rate of 1.24 percent.

Using the growth rate computed, we could project future size of population. Let us project the U.S. population in 2009 assuming the rate of growth remains constant.

y = 281421906 ( e 9 ( 0.01236 ) ) = 292050102

Over 10 million people would be added to the U.S. population in 9 years. This type of projection is acceptable for a short time period, but it should not be used for a long-range projection.

Example 3.17

(population doubling time): How long would it take to double the 2000 U.S. population assuming the annual growth rate remains constant? To answer this question, we solve the following equation for t.

2 a = a e r t , where r = 0.01236 2 = e 0.01236 t ln ( 2 ) = 0.01236 t t = ln ( 2 ) 0.01236 = 069315 0.01236 = 56.09

The U.S. population will double in 56 years or in 2056.

Doubling means that y/a = 2 and natural logarithm of 2 is 0.69315. The solution suggests that if a population is increasing at an annual rate of 1 percent, then the population size will double in about 70 years. The time required to triple the population can be obtained by using ln(3). Similarly, the time required to increase the population by 50 percent can be obtained by using ln(1.5).

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B978012369492850008X

Ordinary Differential Equations

Xin-She Yang , in Engineering Mathematics with Examples and Applications, 2017

12.2 First-Order Equations

We know that d y / d x = x 3 x is a first-order ordinary differential equation, which can be generalized as

(12.4) d y ( x ) d x = f ( x ) ,

where f ( x ) is a given function of x. Its solution can be obtained by simple integration

(12.5) y ( x ) = f ( x ) d x + C .

However, this is a very special case of first-order ODEs.

The integration constant C can be determined by an initial condition at x = 0 . This initial condition often takes the following form:

(12.6) y ( x = 0 ) = y 0 ,  or y ( 0 ) = y 0 ,

where y 0 is a known constant.

Example 12.1

If you have an amount of money y to save in a bank with an interest rate r, the growth of your saving in the bank will obey the following first-order differential equation

d y ( t ) d t = r y ( t ) .

Re-arranging the above equation, we have

d y ( t ) y ( t ) = r d t .

Integrating both side, we have

d y ( t ) y ( t ) = r d t ,

which gives

ln y ( t ) = r t + C ,

where C is the integration constant. Taking exponential on both sides, we have

e ln y ( t ) = y ( t ) = e r t + C = A e r t , A = e C .

Here, the constant A has to be determined by an extra condition or initial condition. Initially, assume that you have y = y 0 when t = 0 ; that is

y ( t = 0 ) = y 0 = A e r × 0 = A ,

which leads to A = y 0 , so the money grows exponentially as

y ( t ) = y 0 e r t .

Suppose you initially have y 0 = 1000 pounds and the annual interest rate is r = 2 % = 0.02 , then your total amount at the end of first year will be

y ( 1 ) = 1000 e 0.02 × 1 = 1020.2 ,

which means that you earn 20.2 pounds in the first year. At the end of a 5-year period, the total saving will become

y ( 5 ) = 1000 e 0.02 × 5 = 1105.1 .

You may wonder why the amount earned in the first year is not 1000 0.02 = 20 pounds, why there is an extra 0.2? The reason is that the interest rate here is a compounding interest rate. If the annual interest rate is r, then the annual growth will be

y ( t = 1 ) = y 0 ( 1 + r ) ,

however, if the compounding periods is n = 12 (monthly), it becomes

y ( t = 1 ) = y 0 ( 1 + r n ) n .

What happens if we calculate it daily ( n = 365 ) or hourly or even every second? As n , we have

y ( t = 1 ) = y 0 lim n ( 1 + r n ) n = y 0 e r ,

where we have used

lim n ( 1 + 1 n ) n = e .

For any t, this becomes

y ( t ) = y 0 e r t ,

which is identical to the expression we obtained by solving the differential equation. Thus, the amount of money is calculated by using a frequency of compounds to infinity. So the effective annual interest rate is essentially

r i = e r 1 ,

which is

r i = e 0.02 1 0.0202 ,

for r = 0.02 . This means that there is 0.2 extra per year for every 1000 pounds.

In general, the first-order ordinary differential equation can be written as

(12.7) p ( x ) d y ( x ) d x + q ( x ) y ( x ) = f ( x ) ,

or

(12.8) p ( x ) y ( x ) + q ( x ) y ( x ) = f ( x ) .

It is obviously that p ( x ) 0 ; otherwise, the above equation degenerate into an algebraic equation. So we divide both sides by p ( x ) , we have

(12.9) y ( x ) + a ( x ) y ( x ) = b ( x ) , a ( x ) = q ( x ) p ( x ) , b ( x ) = f ( x ) p ( x ) .

Therefore, a first-order linear differential equation can generally be written as

(12.10) y + a ( x ) y = b ( x ) ,

where a ( x ) and b ( x ) are known functions of x.

Multiplying both sides of the equation by exp [ a ( x ) d x ] , called the integrating factor, we have

(12.11) y e a ( x ) d x + a ( x ) y e a ( x ) d x = b ( x ) e a ( x ) d x ,

which can be written as

(12.12) [ y e a ( x ) d x ] = b ( x ) e a ( x ) d x .

By simple integration, we have

(12.13) y e a ( x ) d x = b ( x ) e a ( x ) d x d x + C .

After dividing the integrating factor exp [ a ( x ) d x ] , the final solution becomes

(12.14) y ( x ) = e a ( x ) d x b ( x ) e a ( x ) d x d x + C e a ( x ) d x ,

where C is an integration constant to be determined by an initial condition at x = 0 .

Now let us use first-order differential equations to model a real system. The resistor-capacity (RC) circuit shown in Fig. 12.1 consists of a resistor (R) and a capacitor (C), connected to a voltage source V 0 .

Figure 12.1

Figure 12.1. A simple RC circuit.

Let V ( t ) be the voltages across the capacitor, we have

V ( t ) + V R = V 0 ,

where V R is the voltage across the resistor.

From the basic linear circuit theory, we know that the current through the circuit (when the switch is on) can be given by

i = C d V ( t ) d t , V R = i R .

So we have

V + i R = V + R C d V d t = V 0 ,

or

R C d V d t + V = V 0 .

This is essentially a first-order differential equation

Ï„ V ( t ) + V ( t ) = V 0 , Ï„ = R C .

Here, Ï„ is the time constant of the RC circuit.

Example 12.2

By comparing with the general form of ODE (12.10), we have a = 1 / Ï„ and b = V 0 / Ï„ (constant). Since the independent variable is now t, the general solution becomes

y ( t ) = e 1 Ï„ d t V 0 Ï„ e 1 Ï„ d t d t + C e 1 Ï„ d t = V 0 Ï„ e t / Ï„ e t / Ï„ d t + C e t / Ï„ = V 0 e t / Ï„ [ e t / Ï„ ] + C e t / Ï„ = V 0 + C e t / Ï„ .

Before the switch is on, the voltage across the capacitor is zero. That is, V ( t = 0 ) = 0 . Applying this initial condition to the above equation at t = 0 , we have

y ( 0 ) = 0 = V 0 + C e 0 / Ï„ = V 0 + C ,

which gives

C = V 0 .

So the final solution for the voltage variation is

V ( t ) = V 0 V 0 e t / Ï„ = V 0 ( 1 e t / Ï„ ) .

We can see that V ( t ) V 0 as t , which means that this capacitor is fully charged.

In Eq. (12.10), if a ( x ) is a constant, the equation becomes a linear ordinary differential equation with constant coefficients. In this case, a general way to solve such a linear ODE is to divide the solution process into two steps: first find a general solution y ( t ) c to the homogeneous ordinary differential equation by setting b ( x ) = 0 on the right-hand side. Then, the task is to find any particular solution y ( t ) p to the full equation (12.10). The general solution y ( t ) is the sum of these two solutions.

The solution to the homogeneous equation is also called a complementary function, which is the solution to

(12.15) y ( t ) + a y ( t ) = 0 .

Let us revisit the previous example.

Example 12.3

From the equation Ï„ V ( t ) + V ( t ) = V 0 , we have

V ( t ) + 1 Ï„ V ( t ) = V 0 Ï„ .

Its homogeneous equation is

V ( t ) + 1 Ï„ V ( t ) = 0 ,  or d V ( t ) d t + 1 Ï„ V ( t ) = 0 ,

which can also be written as

d V ( t ) V ( t ) = 1 Ï„ .

Integrating both sides, we have

d V ( t ) V ( t ) d V = 1 Ï„ d t ,

which gives

ln V ( t ) = 1 Ï„ t + C ,

where C is an integration constant. Taking exponential operations on both sides, we have

e ln V ( t ) = e 1 Ï„ t + C ,

or

e ln V ( t ) = V ( t ) = e t Ï„ e C ,

which gives

V ( t ) = A e t / Ï„ , A = e C .

This is the complementary function.

To find a particular solution V p , the exact form will depend on the form of the right-hand side. Here, since V 0 / Ï„ is a constant, we can try the solution

V p = k V 0 Ï„ ,

where k is an unknown constant to be determined by substituting into the original equation

( k V 0 Ï„ ) + 1 Ï„ k V 0 Ï„ = V 0 Ï„ ,

or

0 + k V 0 Ï„ 2 = V 0 Ï„ ,

which gives k = Ï„ . So the particular solution becomes

V p = Ï„ V 0 Ï„ = V 0 .

Therefore, the general solution is the sum of the complementary function and the particular integral. That is

V ( t ) = A e t / Ï„ + V 0 ,

where A is an unknown coefficient to be determined by the initial condition.

From the initial condition V ( t = 0 ) = 0 at t = 0 , we have

0 = V ( t = 0 ) = A e 0 / Ï„ + V 0 = A + V 0 ,

which gives A = V 0 . Thus, the final solution is

V ( t ) = V 0 e t / Ï„ + V 0 = V 0 ( 1 e t / Ï„ ) ,

which is exactly the solution we obtained in the previous example.

For this simple first-order ODE, this two-step process may seem lengthy. However, this method can be generalized to solve higher-order linear ordinary differential equations.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128097304000161

Stand-alone hybrid system of solar photovoltaics/wind energy resources: an eco-friendly sustainable approach

Faizan Arif Khan , ... Syed Hasan Saeed , in Renewable Energy Systems, 2021

31.7 Conclusion

This chapter gives a concise coverage about the components and optimization techniques for SPV/Wind HRES that have been utilized for upgrading the HRES in the stand-alone mode. A comprehensive assessment of advancement of hybrid power framework comprising inexhaustible sources is explained in detail. A few advancement strategies and improvement plan are clarified with their eminence. A brief numerical model of a renewable resources and battery bank has been discussed.

The hybrid SPV/wind system offers a lot of advantages in comparison to the existing stand-alone DG system. The hybrid system would be more beneficial in comparison to the grid extention in some cases. The improvement in technology and enhancement in the efficiency of the system provide the hybrid system as good alternative for 24   ×   7 supply to the consumer. The hybrid system also offers cheaper energy cost than the existing conventional system. The hybrid SPV–wind system is the environmental friendly system with 100% renewable power sources and zero harmful gas emissions; however, it has capacity shortage constraints. With a projection period of 25 years and 3% annual interest rate, it is found that the use of hybrid SPV–wind system could serve electricity with significantly lower COE as compared to the stand-alone diesel system. In sum up, the hybrid SPV–wind system is the best alternative in replacing or upgrading existing stand-alone diesel system in the studied village.

HRES is progressively being popularized for remote areas due to the lower cost of SPV and wind generator. It is felt that it will be instrumental for giving power to larger part of billion populace lacking power facility. HRES can accumulate vitality, rather than single renewable source, such as SPV or wind turbine, which improves power reliability of system. The energy optimizing situation, specifically the commitment of sustainable power sources, has been efficiently studied here. To achieve the targeted consumer demand, the power sector authorities play a prominent role in characterizing, planning, and actualizing the exploration of development projects. Research studies have identified two major thrust regions for sustainable improvement as solar and wind energy. Hence, the hybrid system of both the resources would be more effective for future demand. For the advancement and utilization of better sustainable hybrid system, the government is required to focus on the various projects and schemes. This is performed by offering different motivator plans and schemes' incentives and subsidies. Revision to the power demonstration and the relaxed tax approach is required for the flexible implementation and growth of sustainable hybrid system. According to the current status, the development and improvement of SPV/wind hybrid system is moving with a slow pace, which is required to be improved to achieve future targets.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128200049000309

Introductory Numerical Methods

S.J. Garrett , in Introduction to Actuarial and Financial Mathematical Methods, 2015

13.5 Questions

The following questions are intended to test your knowledge of the material discussed in this chapter. Full solutions are available in Chapter 13 Solutions of Part III.

Question 13.1.

You are given that f(x) = x 2 − 2 e x − 2 x + 5 has a single real root x r on [0,1]. Use the following methods to determine the root to within an error tolerance defined by | f(x r)|≤ 0.001. Comment on your answers.

a.

Bisection method

b.

Regula falsi method

Question 13.2.

Repeat Question 13.1 using the Newton-Raphson and Secant methods. Comment on your answers.

Question 13.3.

Implement an appropriate numerical method to determine all real roots of

g ( x ) = 0.67 × 2 . 5 x 1.3 + 2 . 5 x 1.3 × x 0.2 + 1.34 x 5.3 2 x 5.5

Question 13.4.

A saver has been depositing money in a fixed-interest bank account for the last 10 years. If the balance of his account is $15,432 at time t = 10, calculate an approximate value of the annual interest rate earned. You are given that the investor deposited $2000 at time t = 0, $3000 at time t = 3.5, and $5600 at t = 7. You should perform a simple "pen-and-paper" calculation.

Question 13.5.

Implement the elementary definition of a derivative to determine a converged estimate of f′(−1) for f ( x ) = sin ( x 3 ) .

Question 13.6.

Repeat Question 13.5 using the central-difference methods of orders 2 and 4. Comment on your answers.

Question 13.7.

Use the data given in Table 13.20 to estimate the gradient of the unknown function f(x) at each node point using the following approaches.

Table 13.20. Samples of an unknown function f(x) at various node points {x n }

x n f(x n )
-2 -0.6646
-1.9 -0.1671
-1.8 0.2639
-1.7 0.6276
-1.6 0.9252
-1.5 1.1592
-1.4 1.3331
-1.3 1.4521
-1.2 1.5218
-1.1 1.5489
-1 1.5403
-0.9 1.5035
-0.8 1.4459
-0.7 1.3748
-0.6 1.2971
-0.5 1.2194
-0.4 1.1474
-0.3 1.0860
-0.2 1.0392
-0.1 1.0100
0 1.0000
0.1 1.0100
0.2 1.0392
0.3 1.0860
0.4 1.1474
0.5 1.2194
0.6 1.2971
0.7 1.3748
0.8 1.4459
0.9 1.5035
1 1.5403
1.1 1.5489
1.2 1.5218
1.3 1.4521
1.4 1.3331
1.5 1.1592
1.6 0.9252
1.7 0.6276
1.8 0.2639
1.9 -0.1671
2 -0.6646
a.

Elementary approximation.

b.

Central-difference method of order 2.

c.

Central-difference method of order 4.

You are given that f ( x ) = 1 + x 2 cos x . Comment on your answers.

Question 13.8.

For each of the following methods, determine the node points that should be used to evaluate the integral

I = 1.5 1.5 sin ( x 2 ) d x

to within a theoretical error of 0.001.
a.

Trapezoidal approach

b.

Simpson's approach

Implement each approximation.

Question 13.9.

If Z is a random variable with Standard normal distribution, confirm that the probability that Z is between 0 and 4 is 49.997% to within 0.001%. You should use an appropriate implementation of Simpson's approach.

Question 13.10.

An asset, currently priced at $200, is expected to have a market price 1 year from now given by $200S. Here, S is a random variable with density function

f S ( s ) $ 200 = a s exp 1 2 ln ( s ) 1 0.2 2 for s [ 0.1 , 6.1 ]

for some fixed constant a. Estimate the probability that the price 1 year from now will have increased by between 0% and 300%. You should use Simpson's approach of order 16 in any numerical integrals.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128001561000133