{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "2D Input" 2 19 "" 0 1 255 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 260 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 0 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 6 6 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 4 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 3" -1 5 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 4 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 3" -1 257 1 {CSTYLE "" -1 -1 "Time s" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "" 4 258 1 {CSTYLE "" -1 -1 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {SECT 0 {PARA 3 "" 0 "" {TEXT -1 7 "Test 1." }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 78 " How high should be the interest rate (per time unit) , if after time period " }{XPPEDIT 18 0 "T:=2;" "6#>%\"TG\"\"# " }{TEXT -1 144 " is the account status(=the current value of finance )of both accounts the same, if there was at the beginning the value \+ of the first account " }{XPPEDIT 18 0 "x1:=1234;" "6#>%#x1G\"%M7" } {TEXT -1 107 " units and by first account is used simple interest , w hile the beginning value of the 2-th account was " }{XPPEDIT 18 0 "x 2:=1230; " "6#>%#x2G\"%I7" }{TEXT -1 34 " units and used compound inte rest?" }}{PARA 4 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 97 "How high should be the interest rate (per time unit) if for us would the money-saving of value " }{XPPEDIT 19 1 "x[1]:=1234;" "6#>& %\"xG6#\"\"\"\"%M7" }{TEXT -1 69 " by using the simple interest g ive the same benefit as saving " }{XPPEDIT 19 1 "x[2]:=1230; " "6#>& %\"xG6#\"\"#\"%I7" }{TEXT -1 64 " value by using the compound interest during the time period " }{XPPEDIT 19 1 "T:=2;" "6#>%\"TG\"\"#" } {TEXT -1 1 "." }}}{PARA 4 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "equattion:=x[1]*(1+xi*T)=x[2]*(1+xi)^T;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "solution:=solve(\{equattion,xi>0\},xi);\nallvalues(so lution);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "zeta:=op(2,op(evalf(sol ution)));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 187 "plot(x[2]*(1+ xi)^T-x[1]*(1+xi*T),xi=0..zeta+0.1,title=`Difference in present value \+ of simple and compound interest depended on the height of the intere st rate`,titlefont=[HELVETICA,7]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 256 "" 0 "" {TEXT -1 273 "On the 1-st January we have in our account 10 units. On \+ the 1-st March we deposit(=input) another 10 units and on the 1-th se ptember we deposit another 20 units. How high will be the account st atus on the first January next year by the annual interest rate of 0 .05 ?" }}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 481 "Numberofdaysinmonth[1]:=31:\nNumbe rofdaysinmonth[2]:=28:\nNumberofdaysinmonth[3]:=31:\nNumberofdaysinmon th[4]:=30:\nNumberofdaysinmonth[5]:=31:\nNumberofdaysinmonth[6]:=30:\n Numberofdaysinmonth[7]:=31:\nNumberofdaysinmonth[8]:=31:\nNumberofdays inmonth[9]:=30:\nNumberofdaysinmonth[10]:=31:\nNumberofdaysinmonth[11] :=30:\nNumberofdaysinmonth[12]:=31:\nNumberofdaystilltheendoftheyear:= (d,m)->\nNumberofdaysinmonth[m]-d+sum(Numberofdaysinmonth[i],i=m+1..12 );\nNumberofdaystilltheendoftheyear(1,1);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%@NumberofdaystilltheendoftheyearGf*6$%\"dG%\"mG6\"6$% )operatorG%&arrowGF),(&%4NumberofdaysinmonthG6#9%\"\"\"9$!\"\"-%$sumG6 $&F/6#%\"iG/F:;,&F1F2F2F2\"#7F2F)F)F)" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"$k$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 186 "zeta := (1+5/1 00)^(1/365)-1; evalf(10*(1+zeta)^Numberofdaystilltheendoftheyear(21,1 )+10*(1+zeta)^Numberofdaystilltheendoftheyear(16,3)+20*(1+zeta)^Number ofdaystilltheendoftheyear(7,9));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%%zetaG,&*(\"#?!\"\"\"#@#\"\"\"\"$l$F'#\"$k$F,F+F+F(" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+FYc " 0 "" {MPLTEXT 1 0 115 "Numberofdaystilltheendoftheyear(21,1);\nNumberofdays tilltheendoftheyear(16,3);\nNumberofdaystilltheendoftheyear(7,9);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"$W$" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"$!H" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"$:\"" }}}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 257 "" 0 "" {TEXT -1 332 "During the 10-years period we deposit(=input ) each month (allway s at the beginning of the month) the sum of 10 units (10*12 inputs), b ut each year we forget to deposit money in June. How much will we have saved after 10 years(means - in the moment of the last input ) , if t he rate of interest is 0.06 p.a. (per annum = per year) ?" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }{TEXT 257 8 "Solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "We choose a month as a time unit" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 138 "z:=10;\n#z:=3;\n;xi:=6/100;\nzeta:=(1+xi)^(1/12 )-1; \nPeriod:=i->10*12-i-1;\nWithoutforgetting:=evalf(sum(z*(1+zeta)^ Period(i),i=0..10*12-1));\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "Periodb:=i->(z-1)-i;\nForgetting:=evalf((1+zeta)^6*sum(z*(1+xi)^Pe riodb(i),i=0..9));" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "Without forgetting-Forgetting;" "6#,&%2WithoutforgettingG\"\"\"%+ForgettingG! \"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 259 "How high was the debt that rose(= had \+ origin) before 1 year , if we can extinguish(=pay it off = repay) by 1 2 payments each month, when each payment has nominal value of. 144 uni ts, and we pay at the beginning of each month, by the interest rate 1 2/100 p.a.?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "restart;\nxi:=12/100;zeta:=(1+xi)^( 1/12)-1;evalf(zeta);\n#zeta:=xi;\nz:=144;\n#T:=12;T2:=12;" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "equattion := Z*(1+zeta)^23 = sum(z*(1+zeta)^(11-i),i = 0 .. 11);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "evalf(solve(equattion)); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 435 "How high should be the interest rate per yea r,if we want to repay (extinguish) the debt of 100 units (100 is the \+ debt's value in the moment of the first payment) , but we don't want t o repay it completely .We want that after 5 month payments of values 1 0, 20, 20, 20, 30(units ) will be the value of the debt one half (in \+ that moment will be the immediate(=current) value of the debt one half of the value that was at the beginning)." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "z[1] :=10:z[2]:=10:z[3]:=20;z[4]:=20;z[5]:=30:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 7 "Z:=100;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "xxx := Z*(1+xi)^(5/12)-sum(z[i+1]*(1+xi)^((4-i)/12),i = 0 .. 4) = \+ Z/2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "fsolve(xxx);" }}}} {PARA 4 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 356 "How much is the value of coupon debit note(=coupon bond- specific kind of bond ) which has nominal value of 100, in time moment t=0, i f we will be paid (= we will receive) 10 units for each one(of 5 coupo ns ) in time moments t=1,2,...,5, and the interest rate is xi=7/100 an d in time moment t=5 we will be paid also the nominal value of coupon \+ debit note?" }}{PARA 4 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 5 "" 0 " " {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "xi:= 7/100;\n" "6#>%#xiG*&\"\"(\"\"\"\"$+\"!\"\"" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx:=evalf(sum(10*(1+xi)^(5-t),t=1..5)+100);" "6#>%$xxx G-%&evalfG6#,&-%$sumG6$*&\"#5\"\"\"),&F.F.%#xiGF.,&\"\"&F.%\"tG!\"\"F. /F4;F.F3F.\"$+\"F." }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx/(1+xi)^5;" "6#*&%$xxxG\"\"\"*$,&F%F%%#xiGF%\"\"&!\"\"" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 2. " }}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 504 "On the12-th day of each mo nth we deposit 100 units. On the 24-th day of the 6-th and the 12-th month we withdraw (=pick out ) 600 units. How much is the status of o ur account on the 1-st january 2010, if during the first 5 years was the interest rate 0.06 p.a. and for next 5 years was interest rate 0 .04 p.a. and the account was established (=came into existence) on the 1-st January 2000 ? As we want to make this task simplier, consider that each month has 30 days and each year has 12 months." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "xi[1]:=6/100;xi[2]:=4/100;z[1]:=100;z[-1]:=600;\nNumb erofyearsA:=5;NumberofyearsB:=5;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "status := (1+xi[1])^NumberofyearsB*(sum(z[1]*(1+xi[1])^ ((NumberofyearsA*12*30-i*30+18)/360),i = 1 .. NumberofyearsA*12)-sum(z [-1]*(1+xi[1])^((NumberofyearsA*12*30-i*30*6+6)/360),i = 1 .. Numberof yearsA*2))+sum(z[1]*(1+xi[2])^((NumberofyearsB*12*30-i*30+18)/360),i = 1 .. NumberofyearsB*12)-sum(z[-1]*(1+xi[2])^((NumberofyearsB*12*30-i* 30*6+6)/360),i = 1 .. NumberofyearsB*2);" "6#>%'statusG,(*&),&\"\"\"F) &%#xiG6#F)F)%/NumberofyearsBGF),&-%$sumG6$*&&%\"zG6#F)F)),&F)F)&F+6#F) F)*&,(*(%/NumberofyearsAGF)\"#7F)\"#IF)F)*&%\"iGF)F?F)!\"\"\"#=F)F)\"$ g$FBF)/FA;F)*&F=F)F>F)F)-F06$*&&F46#,$F)FBF)),&F)F)&F+6#F)F)*&,(*(F=F) F>F)F?F)F)*(FAF)F?F)\"\"'F)FBFVF)F)FDFBF)/FA;F)*&F=F)\"\"#F)FBF)F)-F06 $*&&F46#F)F)),&F)F)&F+6#FZF)*&,(*(F-F)F>F)F?F)F)*&FAF)F?F)FBFCF)F)FDFB F)/FA;F)*&F-F)F>F)F)-F06$*&&F46#,$F)FBF)),&F)F)&F+6#FZF)*&,(*(F-F)F>F) F?F)F)*(FAF)F?F)FVF)FBFVF)F)FDFBF)/FA;F)*&F-F)FZF)FB" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "`our account status will be`,evalf(status),`unit s`;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 174 "When did arise (= come to existence) the debt of 10 00 units, that we will repay by 20 payments each month , if the paymen ts are 100 units each and the interest rate 1/3 p.a.?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "z0:=1000;z:=100;xi:=1/3;t:='t';" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := z0*(1+xi)^(t+(20-1)/12) = sum(z*(1 +xi)^((i-1)/12),i = 1 .. 20):" "6#>%*equattionG/*&%#z0G\"\"\"),&F(F(%# xiGF(,&%\"tGF(*&,&\"#?F(F(!\"\"F(\"#7F1F(F(-%$sumG6$*&%\"zGF(),&F(F(F+ F(*&,&%\"iGF(F(F1F(F2F1F(/F<;F(F0" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "`the debt arose before `, evalf (solve(equattion)), ` years that means before`, evalf (solve(equattion))*12,` months.`;" }}}}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 665 "Mr. Akihito becomes regullary pension \+ since his 60-th birthday, he becomes 150 units per year from his accou nt. On this account he had in the day of his 60-th birthday ( this da y became Mr. Akihito also the first pension / first time he became 150 units ) 1000 units- so before his 60-th birthday he had saved 1000 u nits. When the account will be in the future empty, Mr. Akihito will d o sepuka (ritual suicide - he will kill himself). He planned funeral \+ on the day of his 72-th birthday. How many years will be his life shor ter, if the interest rate will decrease due to economic recession and the interest rate will be only 1 half of the former interest rate." } }{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "restart;Z0:=1000; z:=150;T0:=(72-60);xi:='xi';i: ='i':" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := Z0*(1+x i)^T = sum(z*(1+xi)^i,i = 0 .. T);" "6#>%*equattionG/*&%#Z0G\"\"\"),&F (F(%#xiGF(%\"TGF(-%$sumG6$*&%\"zGF(),&F(F(F+F(%\"iGF(/F4;\"\"!F," }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "#with(linalg):\n#zeta:=vecto r([allvalues(solve(subs(T=T0,equattion),xi))]);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 38 "zeta:=fsolve(subs(T=T0,equattion),xi);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "#xi:=0;\nfor i from 1 to ve ctdim(zeta) do\nif Im(zeta[i])=0 then\nif zeta[i]>0 then\n xi:=zeta[i] \nfi\nfi\nod;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "xi:=zeta/2 ;\n#subs(T=T0,equattion);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "solve(equattion);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "T: =T0-solve(equattion);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 114 "` The life of Mr. Akihito will be shorter with difference of `,\ntrunc( T)\n,`years and`, (T-trunc(T))*12 ,\n`months`;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 308 " How much is the value of coupon debit note which has nominal value 10 0, in time moment t = 2,5. .We will get paid for each of 5 coupons p ayment 10 units in time moments t=1,2,...,5, if the interest rate is x i=5/100 and in time moment t=5 we will get paid also the nominal value of this coupon debit note?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "So lution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "xi:=5/100;\n" "6#>%# xiG*&\"\"&\"\"\"\"$+\"!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx:=evalf(sum(10*(1+xi)^(2.5-t),t=1..5)+100/(1+xi)^2.5\n-sum(10*(1 +xi)^(2.5-t),t=1..2)\n);" "6#>%$xxxG-%&evalfG6#,(-%$sumG6$*&\"#5\"\"\" ),&F.F.%#xiGF.,&-%&FloatG6$\"#D!\"\"F.%\"tGF7F./F8;F.\"\"&F.*&\"$+\"F. ),&F.F.F1F.-F46$F6F7F7F.-F*6$*&F-F.),&F.F.F1F.,&-F46$F6F7F.F8F7F./F8;F .\"\"#F7" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "evalf(sum(10*(1+x i)^(t),t = 0 .. 4)+100);#/(1+xi)^2.5;" "6#-%&evalfG6#,&-%$sumG6$*&\"#5 \"\"\"),&F,F,%#xiGF,%\"tGF,/F0;\"\"!\"\"%F,\"$+\"F," }}}}{PARA 4 "" 0 "" {TEXT -1 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 3." }} {SECT 1 {PARA 0 "" 0 "" {TEXT -1 569 "When Mr. X counted his pension h e forgot to count the charge (= the fee) which he pays for leading the account. This charge is 1/1000 from the remaining balance on the acc ount (= the sum of money on the account in specific time moment ) and \+ this charge is set ( = is counted ) each month, so it is counted as o ften, as often is the pension paid to Mr.X. . Interest rate is 0.01. \+ Mr.X thought, that he will become 144 payments, so that he will be in good position for next 12 years . How many months will this period be shorter and how high will be the last payment?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 46 ".The \+ basic equation for paying the pension is:" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; equattion := Z*(1+xi)^t-sum(z*(1+zeta)^i,i = 0 .. t-1) = 0;" "6#C$%(restartG>%*equattionG/,&*&%\"ZG\"\"\"),&F+F+%#xi GF+%\"tGF+F+-%$sumG6$*&%\"zGF+),&F+F+%%zetaGF+%\"iGF+/F8;\"\"!,&F/F+F+ !\"\"F=F;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "We count the solutio n of this equation for these entries (= datas) " }{XPPEDIT 18 0 "zeta= xi,xi=.01,t=144,z=1" "6&/%%zetaG%#xiG/F%-%&FloatG6$\"\"\"!\"#/%\"tG\"$ W\"/%\"zGF*" }{TEXT -1 161 ", with unknown variable(= factor that we w ant to find out) is Z, what is the former account status,that is deter mined by the first - wrong calculation (= count)." }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 53 "Z:=solve(subs(zeta=xi,xi=.01,t=144,z=1,equattion),Z );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 172 "We include charge for lead ing the account to the payment of pension ( both these operations dec rease the account status).We solve again the same equation with entrie s : . " }{XPPEDIT 18 0 "zeta=0.011,xi=.01,z=1 a Z " "6%/%%zetaG-%&Floa tG6$\"#6!\"$/%#xiG-F&6$\"\"\"!\"#/%\"zG*(F.F.%\"aGF.%\"ZGF." }{TEXT -1 140 " these datas -entries are from the former counting, the unkn own variable is t ( this is the time period during which is the pensio n paid)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "solve(subs(zeta =0.011,xi=.01,z=1,equattion),t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "restart;\n#z:=1;\n#xi:=0.01;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 45 "The basic equation for paying the pension is:" }}} {EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattio := Z*(1+xi)^(T-1)-sum (z*(1+xi)^t,t = 0 .. T-1);" "6#>%)equattioG,&*&%\"ZG\"\"\"),&F(F(%#xiG F(,&%\"TGF(F(!\"\"F(F(-%$sumG6$*&%\"zGF(),&F(F(F+F(%\"tGF(/F6;\"\"!,&F -F(F(F.F." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "We solve this equati on for entries " }{XPPEDIT 18 0 "xi = .1e-1,T = 144,z = 1;" "6%/%#xiG- %&FloatG6$\"\"\"!\"#/%\"TG\"$W\"/%\"zGF(" }{TEXT -1 142 " , with unk nown variable Z (this is the account status at the beginning ), these entries were determined by the first , wrong calculation." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "Z:=solve(subs(xi=.01,T=144,e quattio),Z);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 217 "Charges for lead ing the account we include into payments of pension ( they both decrea se the account status). We solve the equation with unknown variable T \+ ( which is the time period during which is the pension paid)." }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := Z*(1+xi)^T-sum(z*1.001*(1+xi)^t,t = 0 .. T ) = 0;" "6#>%*equattionG/,&*&%\"ZG\"\"\"),&F)F)%#xiGF)%\"TGF)F)-%$sumG 6$*(%\"zGF)-%&FloatG6$\"%,5!\"$F)),&F)F)F,F)%\"tGF)/F:;\"\"!F-!\"\"F= " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "xxx:=solve(subs(xi=.01, equattion));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "TT:=op(2,(o p(1,xxx[2])));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 252 "`We will get paid`,trunc(TT), `of full pensions which is `, 144-trunc(TT), `le ss than was the assumpion and then we will get another one , value of what will be only`, op(1,subs(T=trunc(TT),z=1,xi=.01,equattion)),`tim es difference of former pensions`;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 475 "Whe Mr. X added up a ll the sums of money,which he send to his account by specific month/ \+ saving( it is called after/deadline saving) and he counted(=calcu lated), how much he will get paid per year, he found out that it is \+ 25/100 more, than how much would be the total sum of all money he s ent(=input). But the reason for it is only that he calculated with the year's interest instead of the month's interest. How high was the mon th's interest( interest per month)?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "The former assum ption can we write:" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; equat tion := sum(z*(1+xi)^i,i = 0 .. 11) = 12*z*(1+25/100);" "6#C$%(restart G>%*equattionG/-%$sumG6$*&%\"zG\"\"\"),&F-F-%#xiGF-%\"iGF-/F1;\"\"!\"# 6*(\"#7F-F,F-,&F-F-*&\"#DF-\"$+\"!\"\"F-F-" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "From it we can count the interest:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 36 "zzz:=fsolve(subs(z=1,equattion),xi);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 49 "This is the year's interest. Month 's interest is:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "(1+zzz)^ (1/12)-1;" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 235 "In the first ban k is the year's interest rate 0.04, in 2-th bank it is 0.07 . In whic h time moment shall we transfer the money from the first bank to the s econd bank, so that would be the valuation (= value increase ) of mon ey 0.06?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 220 "We let our money to valuate with interes t rate 0.04 during time period t and then the valuated money from t he first bank we let to valuate in the second bank with the interest rate 0.07 during the time period 1-t.." }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; equattion := (1+4/100)^t*(1+7/100)^(1-t) = 1+6 /100;" "6#C$%(restartG>%*equattionG/*&),&\"\"\"F+*&\"\"%F+\"$+\"!\"\"F +%\"tGF+),&F+F+*&\"\"(F+F.F/F+,&F+F+F0F/F+,&F+F+*&\"\"'F+F.F/F+" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 78 "print( `We should transfer m oney after `,evalf(solve(equattion))*365,`days.`);" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "evalf(solve(equattion))*12;" }}}}} {SECT 1 {PARA 0 "" 0 "" {TEXT -1 680 "You buy the bill-for-debts (= sp ecific debit note) of your rival ( your enemy). You have bought the bi ll -for debts of values 1000 2000 a 1500 crown , they are payable in t he last day of April,March, May this year increased by the interest \+ with interest rates 25/100, 30/100, 20/100. .However ,you want to se ll all of them on the 1-st January . How high would be the fair pric e when there is the interest rate 0.04 p.a. in year , which is not \+ leap year (the day of sale and also the day of payability shouldn't b e counted(=calculated) to the time period, during which are the bill \+ -for -debts valuated, the reason is - they can't be considered as en tire(=full) days)." }}{PARA 4 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 203 "W e will find out the value of bill-for-debts in time moment, when they should be paid and then we will discount them (that means -we will c ount their value) in time moment, when they should be sold :" }}} {EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "(1000*(125/100)*1.04^(-(30+28+ 31+29)/365)\n+2000*(130/100)*1.04^(-(30+28+30)/365)\n+1500*(120/100)*1 .04^(-(30+28+31+30+30)/365));" "6#,(*(\"%+5\"\"\"*&\"$D\"F&\"$+\"!\"\" F&)-%&FloatG6$\"$/\"!\"#,$*&,*\"#IF&\"#GF&\"#JF&\"#HF&F&\"$l$F*F*F&F&* (\"%+?F&*&\"$I\"F&F)F*F&)-F-6$F/F0,$*&,(F4F&F5F&F4F&F&F8F*F*F&F&*(\"%+ :F&*&\"$?\"F&F)F*F&)-F-6$F/F0,$*&,,F4F&F5F&F6F&F4F&F4F&F&F8F*F*F&F&" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 4." }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 762 "How \+ high is the valuation(=increase in value ) of building saving (= savin g money for later to build or buy house ) with interest 3/100 for 5 \+ years? There is an assumption that we are saving a little sum of money at the start of each month,so the allowance (= contributed input of money ) from the state is 1/4 from the saved sum ( per 1 year ), the \+ saved sum consists of input of money ( what we gave there in 1 year ) + interest from the sum ( which was at the end of the year ) + intere st from the state allowance.The state allowance is added to the accoun t at the beginning of year. Your task is to find out , how high should be the interest in the situation without state allowance , if the va luation of money would be in both situations the same. . " }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; epsilon := 0; xi := 3/100; year := sum((1+xi)^ ((i-epsilon)/12),i = 1 .. 12);" "6#C&%(restartG>%(epsilonG\"\"!>%#xiG* &\"\"$\"\"\"\"$+\"!\"\">%%yearG-%$sumG6$),&F,F,F)F,*&,&%\"iGF,F&F.F,\" #7F./F8;F,F9" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "i:='i';\nSp[0]:=0;Year[0]:=0;\nSp[1 ]:=0;Year[1]:=evalf(year);\nfor i from 2 to 5 do" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "Sp[i] := evalf(1/4*(Year[i-1]-Year[i-2]-Sp[i-1])):" "6# >&%#SpG6#%\"iG-%&evalfG6#*(\"\"\"F,\"\"%!\"\",(&%%YearG6#,&F'F,F,F.F,& F16#,&F'F,\"\"#F.F.&F%6#,&F'F,F,F.F.F," }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "Year[i] := evalf(year+(1+xi)*Year[i-1]+Sp[i]*(1+xi));" "6#>&%%Ye arG6#%\"iG-%&evalfG6#,(%%yearG\"\"\"*&,&F-F-%#xiGF-F-&F%6#,&F'F-F-!\" \"F-F-*&&%#SpG6#F'F-,&F-F-F0F-F-F-" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 89 "od;\nSp[6]:=subs(i=6,evalf(1/25*(Year[i-1]-Year[i-2]-Sp[i-1])));\n Year[5.5]:=Year[5]+Sp[6];" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 " i := 'i'; j := 'j'; for j to 5 do `profitability after`, j, `years of \+ saving will be`, fsolve(sum((1+zeta)^((i-epsilon)/12),i = 1 .. j*12) = Year[j]+Sp[j+1],zeta) end do; `after 5 years is profitability`, fsolv e(sum((1+zeta)^((i-epsilon)/12),i = 1 .. 12*5) = Year[5.5],zeta);" "6# C&>%\"iG.F%>%\"jG.F(?(F(\"\"\"F+\"\"&%%trueG6&%4profitability~afterGF( %8years~of~saving~will~beG-%'fsolveG6$/-%$sumG6$),&F+F+%%zetaGF+*&,&F% F+%(epsilonG!\"\"F+\"#7F>/F%;F+*&F(F+F?F+,&&%%YearG6#F(F+&%#SpG6#,&F(F +F+F+F+F:6$%?after~5~years~is~profitabilityG-F26$/-F66$),&F+F+F:F+*&,& F%F+F=F>F+F?F>/F%;F+*&F?F+F,F+&FE6#-%&FloatG6$\"#bF>F:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 188 "You are repaying (= paying back ) the debt of 12345 uni ts by the interest rate 12,3/100 ( during the repaying period). Your e ach payment is 2345 units. How high will be the last payment.." }} {SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "restart;Z:=12345:xi:=123/1000:z:=2345:" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := Z*(1+xi)^t-sum(z*(1+xi)^ i,i = 0 .. t-1);" "6#>%*equattionG,&*&%\"ZG\"\"\"),&F(F(%#xiGF(%\"tGF( F(-%$sumG6$*&%\"zGF(),&F(F(F+F(%\"iGF(/F4;\"\"!,&F,F(F(!\"\"F9" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "It seems that the debt would be re paid after" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "tau := solve(equattion \+ = 0,t);" "6#>%$tauG-%&solveG6$/%*equattionG\"\"!%\"tG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "payments, but this is not round number. \+ ( I will input to the equation the next lower round number )" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "xxx:=evalf(subs(t=trunc(tau),equattion))* (1*xi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 161 "print(`The debt will be repaid by`,trunc(tau)+1,`payments, the last payment will be t he sum of `,xxx,`money which is`,2345-xxx,`money less than other payme nts`);" }}}}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 602 "You are investing to the production. Your previous net profit per month 10^5 ( 100,000 \+ ) will be double after period of 2 years (profit arises(= comes to e xistence ) at the end of each month and is valuated( = increases value ) by the interest rate 1/20). When you want to do this investment , fi rst you have to loan 10^6 ( 1,000 000 ) in bank and repay this debt w ith interest rate 2/10. How high will be your net profit after these \+ 2 years ( valuated during time period), if you will repay the debt d uring 2 whole years with equal (= the same size ) month payments, all ways at the end of month." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solut ion" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 181 "restart;profit:=2*10 ^5;\nxi := (1.+2/10)^(1/12)-1; \nzeta := (1.+1/20)^(1/12)-1;\nequattio n:=10^6*(1+xi)^2=sum(z*(1+xi)^i,i=0..23);\n`sum of each payment will b e :`;z:=solve(equattion);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "We w ill valuate (= change value in time period) and add up the rest of our money " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "`our net profit will be: `,evalf(sum((profit-z)*(1+zeta)^i,i=0..23));" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 310 "You thought that the interest will be 20 units per \+ year , but after the first half of the year changed the year's intere st rate ( the new interest rate was only 3/4 from the previous interes t rate ) , so the interest per year was only17.493. How high was the previous interest rate at the beginning of year?" }}{SECT 1 {PARA 5 " " 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; equattionA := x*(1+xi)^(1/2)*(1+3*xi/4)^(1/2) = x+17.493; eq uattionB := x*(1+xi) = x+20; x := solve(equattionB,x); equattionA;" "6 #C'%(restartG>%+equattionAG/*(%\"xG\"\"\"),&F*F*%#xiGF**&F*F*\"\"#!\" \"F*),&F*F**(\"\"$F*F-F*\"\"%F0F**&F*F*F/F0F*,&F)F*-%&FloatG6$\"&$\\%+equattionBG/*&F)F*,&F*F*F-F*F*,&F)F*\"#?F*>F)-%&solveG6$F>F)F& " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "`previous interest rate was:`;x i:=evalf(solve(equattionA));\n`and our deposit was:`,x;" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 224 "You thought that the interest will be 20 units per year, but then you deposit (= input) 23/67 less than you wanted before and interest 20 units you will get after year and a \+ half. How high is the year's interest rate? " }}{SECT 1 {PARA 5 "" 0 " " {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "re start;\nalpha:=44/67;" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx:=solve( \{x*(1+xi)-x=alpha*x*(1+xi)^(3/2)-alpha*x\},xi);" "6#>%$xxxG-%&solveG6 $<#/,&*&%\"xG\"\"\",&F-F-%#xiGF-F-F-F,!\"\",&*(%&alphaGF-F,F-),&F-F-F/ F-*&\"\"$F-\"\"#F0F-F-*&F3F-F,F-F0F/" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "`interest rate is`, evalf(op(2,op(1,xxx[2]))),`p. a.` ;" }}}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 5." }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 821 "How high is valuation (= increase in value ) \+ of the building saving (= saving for buying or building a flat or hous e ) with interest rate 3/100 for 5 years? You are saving the little \+ sum of money in the middle of each month , so the state allowance ( = contributed money from the state ) is allways 1/4 from the saved sum \+ of 1 year (this consists of input of money , interest from the money o f last year + interest from the state allowance). The state allowance is added to the account in the middle of the year (But the last stat e allowance will be added at the end of 5-th year). Your task is to fi nd out, how high should the net effective interest without state allow ance , which would give us the same result ( = the same saved sum aft er the saving period ) ( tax is 1/15, building saving is free of tax. ). . " }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 78 "restart;\nepsilon:=1/2; xi:=3/100;\nyear: =sum((1+xi)^((i-epsilon)/12),i=1..12);\n" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "i := 'i'; Sp[0] := 0; Year[0] := 0; Sp[1] := 0; Year[1] := evalf(year); for i from 2 to 5 do Sp[i] := evalf(1/4*(Year[i-1]-Ye ar[i-2]-Sp[i-1])); Year[i] := evalf(year+(1+xi)*Year[i-1]+Sp[i]*(1+xi) ^(1/2)) end do; Sp[6] := subs(i = 6,evalf(1/4*(Year[i-1]-Year[i-2]-Sp[ i-1]))); Year[5] := Year[5]+Sp[6];" "6#C*>%\"iG.F%>&%#SpG6#\"\"!F+>&%% YearG6#F+F+>&F)6#\"\"\"F+>&F.6#F3-%&evalfG6#%%yearG?(F%\"\"#F3\"\"&%%t rueGC$>&F)6#F%-F86#*(F3F3\"\"%!\"\",(&F.6#,&F%F3F3FGF3&F.6#,&F%F3F&F.6#F%-F86#,(F:F3*&,&F3F3%#xiGF3F3&F.6#,&F%F3F3F GF3F3*&&F)6#F%F3),&F3F3FZF3*&F3F3F&F)6#\"\"'-%%subsG6$/F%Fao-F 86#*(F3F3FFFG,(&F.6#,&F%F3F3FGF3&F.6#,&F%F3F& F.6#F=,&&F.6#F=F3&F)6#FaoF3" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "i : = 'i'; fsolve(sum((1+zeta*(1-15/100))^((i-epsilon)/12),i = 1 .. 12*5) \+ = Year[5],zeta);" "6#C$>%\"iG.F%-%'fsolveG6$/-%$sumG6$),&\"\"\"F0*&%%z etaGF0,&F0F0*&\"#:F0\"$+\"!\"\"F7F0F0*&,&F%F0%(epsilonGF7F0\"#7F7/F%;F 0*&F;F0\"\"&F0&%%YearG6#F?F2" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "0.113/0.099;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 555 "You are investing to the production.Your previous net pr ofit per month 10^5 (=100,000 ) will be double after 2 years period . \+ At the beginning you have to loan 10^6 (= 1,000,000 ) in bank and you \+ have to repay the debt with interest rate 2/10 p.a. . How high will b e your net profit for these 2 years (valuated in time= value of your \+ assets will change during period time) by the interest rate 1/20 p.a. if you will be repaying the debt with the highest possible payments, the highest possible means possible from your profit at the end of ea ch month." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; profit := 2*10^5; xi := (1.+ 2/10)^(1/12)-1; zeta := (1.+1/20)^(1/12)-1; equattion := 10^6*(1+xi)^T -sum(z*(1+xi)^i,i = 0 .. T-1); TT := solve(subs(z = profit,equattion) \+ = 0,T);" "6#C(%(restartG>%'profitG*&\"\"#\"\"\"*$\"#5\"\"&F)>%#xiG,&), &-%&FloatG6$F)\"\"!F)*&F(F)F+!\"\"F)*&F)F)\"#7F7F)F)F7>%%zetaG,&),&-F3 6$F)F5F)*&F)F)\"#?F7F)*&F)F)F9F7F)F)F7>%*equattionG,&*&F+\"\"'),&F)F)F .F)%\"TGF)F)-%$sumG6$*&%\"zGF)),&F)F)F.F)%\"iGF)/FS;F5,&FKF)F)F7F7>%#T TG-%&solveG6$/-%%subsG6$/FPF&FEF5FK" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "print(`period in years is `,TT/12);" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx := subs(z = profit,T = trunc(TT), equattion);" "6#>%$xxxG-%%subsG6%/%\"zG%'profitG/%\"TG-%&truncG6#%#TTG %*equattionG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "sum(profit* (1+zeta)^t,t = 0 .. 24-trunc(TT)-1-1)+(profit-xxx)*(1+zeta)^(24-trunc( TT)-1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "`note`,24-trunc( TT)-1;(profit-xxx);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "Sum( profit*(1+zeta)^t,t = 0 .. 24-trunc(TT)-1-1)+(profit-xxx)*(1+zeta)^(24 -trunc(TT)-1);" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 906 "You have po rtfolio which consists of shares: number of 3 different kinds of shar es is 40,35,25 items ; at the beginning of the year their value a t the market was 12, 7 a 11 crown per 1 share and at the end of the ye ar were their values 17, 7.5 a 9 crown per 1 share . At the end of th e year you will change your portfolio ( without investing another mon ey ) , so that the proportion of the number of different kind of shar es would be the same as the proportion of their profibilities last yea r, and you will sell all the shares which recorded loss ( = you became less than you invested ) . At the end of next year is the market val ue of mentioned kinds of shares 16,9,12 crown per 1 share. How much d id you lose when you used your strategy ( described above ) in compar ison to ( = we are comparing to ) the best possible strategy , which i s to optimize portfolio at the start of both years ?." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 130 "Restart;\nDigits:=12;\nNumberofshares[1]:=40;\nNumbe rofshares[2]:=35;\nNumberofshares[3]:=25;\nValue[1]:=12;Value[2]:=7;\n Value[3]:=11;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "i:='i': \nCapital[1]:=sum(Numberofshares[i]*Value[i],i=1..3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "Profitability[1]:=17/12-1;\nProfita bility[2]:=75/70-1;\nProfitability[3]:=9/11-1;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 144 "The first share has the best profitability..Optimal strategy for the first year was to buy the maximum possible amount of first kind of shares.:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "Optimaln umber[1]:=floor(Capital[1]/Value[1]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "It will remain(= the remainings=the rest)::" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "Remain:=Capital[1]-Value[1]*Optimalnumber[1]; " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 46 " crown and for this we cannot buy more shares." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "Value[1]:=17;\nValue[2]:=75/ 10;\nValue[3]:=9;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 119 "Cap ital[2]:=sum(Numberofshares[i]*Value[i],i=1..3);`=`,evalf(Capital[2]); \nOptimalcapital[2]:=Optimalnumber[1]*Value[1];" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 129 "for i from 1 to 3 do\n if Profitability[i]<=0 then\n Numberofshares[i]:=0\n else\n Numberofshares[i]:=Profita bility[i]\n fi\nod;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "i:= 'i':A:='A';\nEquattion:=sum(A*Numberofshares[i]*Value[i],i=1..3)=Capit al[2];\nA:=solve(Equattion);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 258 "for i from 1 to 3 do\n Numberofshares[i]:=A*Numberofshares[i] ;\n `=`,evalf(Numberofshares[i]);\n Numberofshares[i]:=floor(evalf (Numberofshares[i]));\n od;\ni:='i':\nRemainingmoney:=Capital[2]-sum(N umberofshares[i]*Value[i],i=1..3);\n`=`,evalf(Remainingmoney);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 31 "For this money we could buy yet" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 130 "for i from 1 to 3 do\nPossibility [i]:=floor(Remainingmoney/Value[i]);\nprint(Possibility[i],`shares of \+ kind`,i, `orr`);\nod:`. . .`; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 199 "abs(evalf(Profitability[1]/Profitability[2]-(Numberofshares[1 ]+Possibility[1])/Numberofshares[2]));\nabs(evalf(Profitability[1]/Pro fitability[2]-Numberofshares[1]/(Numberofshares[2]+Possibility[2]))); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "We will choose the first poss ibility, we will buy another 1 share of kind 1." }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 52 "Numberofshares[1]:=Numberofshares[1]+Possibili ty[1];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 31 "Profitability in the 2- th year:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "Profitability[1 ]:=16/17-1;\nProfitability[2]:=9/(15/2)-1;\nProfitability[3]:=12/9-1; " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 82 "In the 2-th year was the shar e of kind 3 the most profitable. Optimal strategy is:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "Optimalnumber[3]:=floor((Remain+Optimalcapital[2 ])/Value[3]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 "It will remain: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "Remain:=Remain+Optimalcapital[2 ]-Value[3]*Optimalnumber[3];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "For this sum we cannot buy anothe r share." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "Optimalnumber[2 ]:=0;Optimalnumber[1]:=0; " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 178 "Valuee[1]:=16;\nValuee[2]: =9;\nValuee[3]:=12;\ni:='i':\nCapital[3]:=sum(Numberofshares[i]*Value[ i],i=1..3);`=`,evalf(Capital[2]);\nOptimalcapital[3]:=Optimalnumber[3] *Value[3]+Remain;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "Loss:= Optimalcapital[3]-Capital[3];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 " crown , what is" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 101 "evalf(L oss/Capital[1]),`of previous capital , profit could be plus`,\nevalf(L oss/Capital[3]),`higher`;" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 305 " Dan bought new car on leasing, he should pay 130 000 crown by 36 mon th's payments of 4592,5 crown. He had to repay the leasing from savin gs. How high should be the interest rate of his saving account , so t hat this repaying would be for Dan cheaper than if he would now repay \+ all the sum of 130 ,000?\n" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solu tion" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := sum(4592.5*(1+xi)^i,i = \+ 0 .. 35) = 130000*(1+xi)^36;" "6#>%*equattionG/-%$sumG6$*&-%&FloatG6$ \"&Df%!\"\"\"\"\"),&F/F/%#xiGF/%\"iGF//F3;\"\"!\"#N*&\"'++8F/*$,&F/F/F 2F/\"#OF/" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "xxx:=fsolve(eq uattion,xi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "`The repayi ng is profitable with the year's interest rate higher than`, (1+xxx[2] )^12-1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{PARA 4 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 132 "Interest f or the first time period is 100, interest for the 3-rd time period is \+ 120, how high is the interest fot the 5-th period ?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 108 "restart;\nequattion:=\nkappa*x[0]=100,\nx[1]=x[0]+100,\nx[2]=x[ 1]*(1+kappa),\nkappa*x[2]=120;\nsolve(\{equattion\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "kappa:=allvalues(RootOf(10*_Z-1+5*_ Z^2));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "x[0] := 1000+500* kappa[1];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 107 "for i from 0 to 4 do\nprint(`interest for `, \+ i+1,`time period is`, evalf(x[0]*(1+kappa[1])^i*kappa[1]));\nod;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "restart;\n" }{TEXT -1 107 "ti me moments 1, 3, a 5 are in the same time-distance . The interests ha ve to construct the geometric row :" }{MPLTEXT 1 0 1 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "x[1]:=100;x[3]:=120;\nx[5]=solve(x[ 5]/x[3]=x[3]/x[1]);" }}}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 6. " }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 413 "Dan bought new car on leasin g, he now has to repay the debt of 130 000 crown by 36 month's payme nts , each payment of 4592,5 crown. If the leasing company will let h im to pay the last 13 payments in one time moment ( in time moment whe n the first of them should be paid ) , how high would be the fair hei ght (= value of money ) of them. ( this sum of money responds to the interest that Dan has to repay) ? " }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" } }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := sum(45925/10*(1 +xi)^i,i = 0 .. 35) = 130000*(1+xi)^36;" "6#>%*equattionG/-%$sumG6$*( \"&Df%\"\"\"\"#5!\"\"),&F+F+%#xiGF+%\"iGF+/F1;\"\"!\"#N*&\"'++8F+*$,&F +F+F0F+\"#OF+" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "xxx:=fsolv e(equattion,xi);" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "xi := xxx[2]; `fa ir price is`, sum(45925/10*(1+xi)^(-i),i = 0 .. 13);" "6#C$>%#xiG&%$xx xG6#\"\"#6$%.fair~price~isG-%$sumG6$*(\"&Df%\"\"\"\"#5!\"\"),&F1F1F%F1 ,$%\"iGF3F1/F7;\"\"!\"#8" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {PARA 4 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 351 "Investment strategy A:\nAt the beginning you have capital which cons ists of shares ( according to the input of this task ) , and this cap ital changes its value when the shares change value ( the shares , any way , could change its value only in time moments when you can buy or \+ sell shares on the market - these time moments are input in this task \+ )\n " }{XPPEDIT 18 0 "alpha;" "6#%&alphaG" }{TEXT -1 613 ") In all nex t time moments you will divide the actual capital according to the pro portion of the profitabilities (= how much increased the value ) of sh ares for previous time period( you don't take into your calculations s hares which didn't have profibility). !!NOTE :In this task is profitab ility considered as relative profit ( how much is the current value hi gher than the original value). You want to buy shares in this proporti on , but the number of shares is not round number, so you will buy so \+ many shares, which number is the next lower round number to the numbe r determined above by your calculation . " }{XPPEDIT 18 0 "beta;" "6#% %betaG" }{TEXT -1 215 " ) The remaining capital you will invest contin ually ( in highest possible amount ) in other titles of assets ( these items(=titles) are ordered according to their profitability , includi ng also loss-making items ) " }{XPPEDIT 18 0 "gamma;" "6#%&gammaG" } {TEXT -1 494 " ) The next remaining capital you will let as ready mon ey for the next time period. You have portfolio which consists of 3 ki nds of shares , their numbers are 40, 35 a 25 items. At the beginning \+ of the year were their market prices 12, 7 a 11 crowns for 1 share an d at the end of the year were their prices 17, 7.5 a 9 crown for 1 sh are. At the end of next year are the prices of these shares 16, 9, 12 crown for 1 share . How high is the profitability of strategy A for \+ the 2 -nd year? " }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 310 "restart;\nDigits:=12:\nNumb erofshares[1,1]:=40:\nNumberofshares[2,1]:=35:\nNumberofshares[3,1]:=2 5:\nValue[1,1]:=12:\nValue[2,1]:=7:\nValue[3,1]:=11:\nValue[1,2]:=17: \nValue[2,2]:=75/10:\nValue[3,2]:=9:\nValue[1,3]:=16:\nValue[2,3]:=9: \nValue[3,3]:=12:\nNumberofitems:=3:\nFreecapital[1]:=0:\n#change into Freecapital[i] !!!\n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 230 "i:='i':j:='j':\nCapital:=j->sum(Numberofshares[k,j-1]*Value[k,j],k=1. .Numberofitems)+Freecapital[j-1];\nProfitability:=(i,j)->Value[i,j+1]/ Value[i,j]-1;\n#how high will be the profitability of share of kind i \+ after j-time periods;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "#i:=2;\nPredividing:=proc(p)\nlocal k,j,A,Equat;\nglobal Numberof shares;\nj:='j':k:='k':i:='i';" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 530 " for j from 1 to Numberofitems do\n if Profitability(j,p-1)>0 then\n \+ Numberofshares[j,p]:=Profitability(j,p-1)/Value[j,p];\n else\n N umberofshares[j,p]:=0;\n fi;\nprint(`Numberofshar`,ii[j,p]=Numberofsh ares[j,p])\nod;\nk:='k':j:='j':A:='A':\nEquat:=sum(A*Numberofshares[j, p]*Value[j,p],j=1..Numberofitems)=Capital(p);print(`equattio`,Equat); \nA:=solve(Equat);\nprint(`A=`,A);\n#A:=1;\nfor j from 1 to Numberofit ems do\n Numberofshares[j,p]:=A*Numberofshares[j,p];\n print(`Numberof shar`,ii[j,p]=Numberofshares[j,p])\nod;j:='j':\nend;\n " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "#Predividing(2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 175 "Value[1,2]*Numberofshares[1,2]+Val ue[2,2]*Numberofshares[2,2]=Capital(2);Value[1,2]*Numberofshares[1,2]/ (Value[2,2]*Numberofshares[2,2])=Profitability(1,1)/Profitability(2,1) ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1 "\n" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 195 "#i:=2:\nLastdividing:=proc(i)\nlocal j,Orderedprof itability,k,l;\nglobal Numberofshares,Freecapital,CapitalX,Capital;\nj :='j':\nOrderedprofitability:=sort([Profitability(j,i-1) $j=1..Numbero fitems]);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 318 "CapitalX:=Capital(i );\nj:='j':k:='k':\nfor j from 1 to Numberofitems do\n Numberofshares [j,i-1]:=trunc(Numberofshares[j,i]);\n print(`we should buy `, Number ofshares[j,i] ,`shares of kind`, j, `so we will buy `, Numberofshares [j,i-1]); \nod:\nFreecapital[i]:=CapitalX-Capital(i):\nprint(`it will \+ remain `, Freecapital[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 510 "print(`free capital we will divide by this way:`);\nfor k from 0 to Numberofitems-1 do\n j:=Numberofite ms-k;\n for l from 1 while Profitability(j,i-1)>Orderedprofitability [l] do\n od;\n Numberofshares[l,i]:=Numberofshares[l,i-1]+ trunc(F reecapital[i]/Value[j,i]);\n print(`for`, trunc(Freecapital[i]/Value[ j,i]), `we will buy`,trunc(Freecapital[i]/Value[j,i]),` shares of kind `, j);\n Freecapital[i]:=Freecapital[i]- trunc(Freecapital[i]/Value[j ,i])*Value[j,i];\n print(`it will remain`, Freecapital[i]);\nod;" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "Predivi ding(2);Lastdividing(2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "evalf(CapitalX);Capital(3);" }}{PARA 0 "" 0 "" {TEXT -1 15 "so our lo ss is." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 "\n" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 198 "If you repay the debt by 10 payments, y ou will pay nominally 25 units more, than you have loaned . If you re pay the debt by 11 payments, you will pay 30 units more. How high is \+ the interest rate?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 303 "`We consider the difference between the nominal va lue of the debt in time moment when it arose and in time moment of the repayment of the whole debt .Epsilon is time period between the time moment when the debt arose and the time moment of the first payment:` ;\nOverpayment:=n->Z*(1-(1+xi)^(n+epsilon));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 143 "equattion1:=Overpayment(10)=25;\nequattion2:=Ov erpayment(11)=30;\n`we solve the equattion:`;\nequattion:=solve(equatt ion1,Z)=solve(equattion2,Z); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "`we choose`;epsilon:=0;\n`solution:`;\nxxx:=solve(equattion);" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "`interest rate is `, allvalues(xxx)[10], `during payment period`; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 155 "xxx := RootOf(-5+5*_Z+105*_Z^2+390*_Z^3+798*_Z^4+105 0*_Z^5+930*_Z^6+555*_Z^7+215*_Z^8+49*_Z^9+5*_Z^10);\nallvalues(xxx)[10 ];\nsubs(xi=.1509841448,equattion);" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 171 "How high are 12 payments when you want to repay the debt in his real value , if the inflation rate during even time period is \+ 0.04 and during odd time period it is 0.06.." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equ attion := Z*1.04^6*1.06^6 = sum(z*1.04^i*1.06^i,i = 0 .. 5)+1.06*sum(z *1.04^i*1.06^i,i = 0 .. 6);" "6#>%*equattionG/*(%\"ZG\"\"\"*$-%&FloatG 6$\"$/\"!\"#\"\"'F(-F+6$\"$1\"F.F/,&-%$sumG6$*(%\"zGF()-F+6$F-F.%\"iGF ()-F+6$F2F.F " 0 "" {MPLTEXT 1 0 198 "`We will repay the debt by payments, which will have value approx imately 1/10 of the value of the debt in time moment , when we will st art to repay the debt , precisely it is :`, solve(equattion,z);" }}}}} {SECT 1 {PARA 0 "" 0 "" {TEXT -1 328 "In the first bank is year's inte rest rate 0.04, in the second bank it is 0.14 . At the beginning you h ad money in the first bank , then you transferred it to the second one ?Profitability of input capital for the whole year was 0.09. In whic h time moment did you transfer the money ( your task is to find out th e concrete day)?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 171 "Our money are valuated with inter est _0.04 during time period t and the sum of money from the first ban k is then valuated with interest rate 0.07 during time period 1-t." }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; equattion := (1+4/ 100)^t*(1+14/100)^(1-t) = 1+9/100;" "6#C$%(restartG>%*equattionG/*&),& \"\"\"F+*&\"\"%F+\"$+\"!\"\"F+%\"tGF+),&F+F+*&\"#9F+F.F/F+,&F+F+F0F/F+ ,&F+F+*&\"\"*F+F.F/F+" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 77 "pr int( `Money was transferred after `,evalf(solve(equattion))*365,` day s.`);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 133 "`that \+ is after part`, evalf(solve(equattion)), `of the year `, `that is afte r`, evalf(solve(equattion))*12, `1/12-parts of the year`;" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 150 "Interest for the first time period is \+ 100, interest for the first 2 periods is 212, how high is the interes t for the5 -th period? !!! rce =equattion." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 134 "res tart;\nrce:=\nkappa*x[0]=100,\nx[0]*(1+kappa)^2-x[0]=212;\n#100+x[0]*( 1+kappa)^2*kappa+x[0]*(1+kappa)^3*kappa=333;\nxxx:=solve(\{rce\});\n\n " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 153 "if op(1,op(1,xxx))=kap pa then \n#1=1 then\n`A`;\nkappa:=op(2,op(1,xxx));\nx[0]:=op(2,op(2,xx x));\nelse\n`B`;\nkappa:=op(2,op(2,xxx));\nx[0]:=op(2,op(1,xxx));\nfi; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "#op(2,op(2,xxx));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "for i from 1 to 5 do\nprint (`inte rest for `, i,`. time period is`, evalf(x[0]*(1+kappa)^i-x[0]*(1+kappa )^(i-1)));\nod;" }}}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 7." }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 81 " i-th. commodity, i=1,2,3 is trading in the time moments t=1,2,3,4,5 in quotation " }{XPPEDIT 18 0 "kappa(i,t) = abs(sin(i*t/2))+1;" "6#/-%&k appaG6$%\"iG%\"tG,&-%$absG6#-%$sinG6#*(F'\"\"\"F(F1\"\"#!\"\"F1F1F1" } {TEXT -1 423 " ( that means the absolute value of sine of one half of this expression- (kind of share * time) +1 - this whole formula is the price for 1 item of commodity )You have 100 crowns and a knowl edge of all quotations in advance. What is the highest amount you can \+ earn? (in the case all commodities can be ideally divisible and that \+ you can buy whatever portion of the commodity-unit)? ( kind of share = group of share )" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "restart ;\nkappa:=(i,t)->abs(sin(i*t/2))+1;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "#plot(\{kappa(1,t),kappa(2,t),kappa(3,t)\},t=0..6);" }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 137 "Numberofitems:=3;\nCapital[1]:=100;\nProfitability:= (i,t)->kappa(i,t+1)/kappa(i,t);\nValue:=t->Sum(kappa(i)*Number[i],i=1. .Numberofitems);\n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "Max :=t->max(Profitability(i,t) $i=1..Numberofitems);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 130 "Choice:=proc(t)\nglobal Groupofitem;\nfor i from 1 to Numberofitems do\nif Max(t)=Profitability(i,t)\nthen Groupo fitem:=i;\nfi \nod\nend;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 408 "for t from 1 to 5 do \ni:='i';\nChoice(t); \n for i from 1 to N umberofitems do\n Number[i]:=0;\n od:\nNumber[Groupofitem]:=Capital [t]/kappa(Groupofitem,t);\nCapital[t+1]:=Number[Groupofitem]*kappa(Gro upofitem,t+1);\nprint(`in time moment `,t, ` I will buy `, evalf(Numbe r[Groupofitem]),\n ` units of commodity group`, Groupofitem, `in tim e moment`, t+1, `I will have capital of size`, evalf(Capital[t+1]));\n od:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 " " {TEXT -1 166 "Deposits are in proportion 2:3, interests in proportio n 3:4, what is the relation between the interest-rates?(Define the fir st interest rate as a function of second)." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "Depo sit[1]:=2*A;Deposit[2]:=3*A;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "Interest[1]:=Deposit[1]*(1+xi);Interest[2]:=Deposit[2]*(1+zeta); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "xxx:=Interest[1]/Intere st[2]=3/4;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "#readlib(isol ate):\nxi=solve(xxx,xi);\nzeta=solve(xxx,zeta);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 363 "During \+ the time period 2040 days we are saving 77.7 pounds at the end of the \+ first third of every 120 -days period (= so we divide 2040 into perio ds of 120 days , and at the end of first third of each of them we in put 77.7 p ) Your task is to find out how many times more would you ha ve if you save at the end of the second third of those 120 / days peri ods ?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart;\nsimplify(sum(z*(1+xi)^(t-1/ 3),t=1..T)/sum(z*(1+xi)^(t-2/3),t=1..T));" "6#C$%(restartG-%)simplifyG 6#*&-%$sumG6$*&%\"zG\"\"\"),&F.F.%#xiGF.,&%\"tGF.*&F.F.\"\"$!\"\"F6F./ F3;F.%\"TGF.-F*6$*&F-F.),&F.F.F1F.,&F3F.*&\"\"#F.F5F6F6F./F3;F.F9F6" } }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 291 "In the first four terms wer e the interests of our sum (in the times 1,2,3,4), without any other \+ change, were 100, 120,144,178. How has the interest-rate changed in th e time moment 2.5 and 3.5 comparing to the interest rate in the time \+ moment 2? (it has not changed in other time moments)." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "restart;\n`In the time moment 2.5 interest-rate did n ot change at all and was`, 20/100=24/120;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 52 "equattion:=144*(1+20/100)^(1/2)*(1+xi)^(1/2)=34+144 ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "evalf(144*(1+20/100))- 144=172.8-144;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "#equattio n := 144/5*sqrt(6)*sqrt(5)*sqrt(1+xi) = 28172.8;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 109 "`In the time moment 3.5 It has changed into \+ `,solve(equattion),`approximately into`,evalf(solve(equattion));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "for i from 1 to 5 do \nevalf (500*(1+1/5)^i-500*(1+1/5)^(i-1));\nod;" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 350 "We are saving. We are sending an amount of 144money to t he account with the interest-rate 5/100 in the period (= term), which \+ has the length as the distance between the two consecutive going input s. This I-Rate will have changed into 6/100 in the moment, when the a ccount-balance exceeds1600money. How much we will have saved after 14 \+ payment terms?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "restart;\nx:=144;xi:=5/100;z eta:=6/100;\nkernel:=sum(x*(1+xi)^t,t=0..T);\nTT:=solve(kernel=1600); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 347 "`After`, trunc(TT),` p ayments we will have`, evalf(subs(T=trunc(TT),kernel)),\n`before`, tru nc(TT)+1, `payment we will have`,\nevalf(subs(T=trunc(TT),kernel)*(1+x i)),\n`and after`, trunc(TT)+1, `payment we will have`,\nevalf(subs(T= trunc(TT)+1,kernel)),` so the interest growth will start between the \+ pay of`, trunc(TT), an,trunc(TT)+1, `payment.`; " }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "Tau:=so lve(subs(T=trunc(TT),kernel)*(1+xi)^tau=1600): \n" "6#>%$TauG-%&solveG 6#/*&-%%subsG6$/%\"TG-%&truncG6#%#TTG%'kernelG\"\"\"),&F4F4%#xiGF4%$ta uGF4\"%+;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 122 "`in time moment`, tru nc(TT)+evalf(Tau), `the time unit is the payment term, beginning in th e moment of the first payment`;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 139 "`Savings together will be: `,\nevalf(subs(T=floor(TT),kernel) *(1+xi)^(Tau)*(1+zeta)^(14-floor(TT)-Tau)+sum(x*(1+zeta)^t,t=0..14-flo or(TT)));" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 219 "How much will yo u save with 120 inputs of amount 120 crowns, if the interest rate in e very even term is 4/100 and in every odd term is 7/100 for the term? \+ (what will be the account status in the moment of last input)? " }} {SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "evalf(sum(120*((1+4/100)*(1+7/100))^t,t=0..59)*(2+ 7/100));" }}}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 8." }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 99 "Interests are in proportion 3:4 and int erest-rates in 4:3. What is the proportion for the deposits?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "restart;\nInterest[1]:=3*A;Interest[2]:=4*A;xi[1]:=4* B;xi[2]:=3*B;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "equattion1 :=Deposit[1]*xi[1]=Interest[1];\nequattion2:=Deposit[2]*xi[2]=Interest [2];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "equattion:=op(1,equ attion1)/op(1,equattion2)=op(2,equattion1)/op(2,equattion2);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "solve(equattion,Deposit[1]/D eposit[2]);" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 360 "We are saving. We are sending an amount of 144 money to the account with the interes t-rate 4/100 in the term(= time period ), which has the length as the \+ distance between the two consecutive going inputs. This I-Rate will c hang into 5/100 in the moment, when the account-balance exceeds1800mo ney. How much we will have saved after 14 payment terms (periods)?" }} {SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; x := 144; xi := 4/100; zeta := 5/100; K := \+ 14; kernel := sum(x*(1+xi)^t,t = 0 .. T); TT := solve(kernel = 1800); \+ evalf(TT);" "6#C*%(restartG>%\"xG\"$W\">%#xiG*&\"\"%\"\"\"\"$+\"!\"\"> %%zetaG*&\"\"&F,F-F.>%\"KG\"#9>%'kernelG-%$sumG6$*&F&F,),&F,F,F)F,%\"t GF,/F>;\"\"!%\"TG>%#TTG-%&solveG6#/F7\"%+=-%&evalfG6#FD" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 362 "`After`, trunc(TT),` payments we w ill have`, evalf(subs(T=trunc(TT),kernel)),\n`before`, trunc(TT)+1, `p ayment we will have`,\nevalf(subs(T=trunc(TT),kernel)*(1+xi)),\n`and a fter`, trunc(TT)+1, `payment we will have`,\nevalf(subs(T=trunc(TT)+1, kernel)),` 180 money we will have in time moment,so the interest incre ase will be after paying`, trunc(TT)+1, `payment.`; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "Tau:=0;" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "`Savings together will be: `,evalf(subs(T = ceil(TT),kernel)*(1+zet a)^(K-ceil(TT))+sum(x*(1+zeta)^t,t = 0 .. K-ceil(TT)));" "6$%;Savings~ together~will~be:~G-%&evalfG6#,&*&-%%subsG6$/%\"TG-%%ceilG6#%#TTG%'ker nelG\"\"\"),&F3F3%%zetaGF3,&%\"KGF3-F/6#F1!\"\"F3F3-%$sumG6$*&%\"xGF3) ,&F3F3F6F3%\"tGF3/FC;\"\"!,&F8F3-F/6#F1F;F3" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "ceil(TT);subs(T=ceil(TT),kernel)*(1.+zeta)^(K-ceil(T T));sum(x*(1.+zeta)^t,t=0..K-ceil(TT));" "6#C%-%%ceilG6#%#TTG*&-%%subs G6$/%\"TG-F%6#F'%'kernelG\"\"\"),&-%&FloatG6$F1\"\"!F1%%zetaGF1,&%\"KG F1-F%6#F'!\"\"F1-%$sumG6$*&%\"xGF1),&-F56$F1F7F1F8F1%\"tGF1/FG;F7,&F:F 1-F%6#F'F=" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 349 "You are saving \+ every month 120 money to the account, where the interest-rate is 5/100 p. m. From the 17th month(including) has been your son picking out mon thly from the account the sum( each time moment he picked out the sam e sum ). After 127 months(in 128th month) is there the amount of 12030 money. What is the monthly sum picked out by your son?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; xi := 5/100; T := 98-15; xxx := solve(sum(120* (1+xi)^n,n = 0 .. 127)+sum(-z*(1+xi)^(n-16),n = 16 .. 127) = 12030); ` That rogue picked out`, evalf(xxx), money;" "6#C'%(restartG>%#xiG*&\" \"&\"\"\"\"$+\"!\"\">%\"TG,&\"#)*F)\"#:F+>%$xxxG-%&solveG6#/,&-%$sumG6 $*&\"$?\"F)),&F)F)F&F)%\"nGF)/F?;\"\"!\"$F\"F)-F96$,$*&%\"zGF)),&F)F)F &F),&F?F)\"#;F+F)F+/F?;FLFCF)\"&I?\"6%%6That~rogue~picked~outG-%&evalf G6#F2%&moneyG" }}}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 81 "i-th. commodity, i=1,2,3 is trading in th e time moments t=1,2,3,4,5 in quotation " }{XPPEDIT 18 0 "kappa(i,t)= \+ abs(sin(i+t/2))+1" "6#/-%&kappaG6$%\"iG%\"tG,&-%$absG6#-%$sinG6#,&F'\" \"\"*&F(F1\"\"#!\"\"F1F1F1F1" }{TEXT -1 367 " ( absolute value of sin e of sum of item-number and one half of time plus 1 ... This whole f ormula is the price for one unit of commodity ) .You have 100crowns an d a knowledge of all quotations in advance. What is the highest amount you can earn? (in this case all the commodities can be ideally divi sible and you can buy whatever portion of the commodity-unit)?" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "restart;\nkappa:=(i,t)->abs( sin(i+t/2))+1;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "plot(\{kappa(1,t) ,kappa(2,t),kappa(3,t)\},t=0..6);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "kappa(3,1)=evalf(kappa(3,1));kappa(3,2)=evalf(kappa(3 ,2));\n100*evalf(kappa(3,2))/evalf(kappa(3,1));" }}}{SECT 1 {PARA 5 " " 0 "" {TEXT -1 8 "solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 137 "Numberofitems:=3;\nCapital[1]:=100;\nProfitability:=(i,t)->kappa( i,t+1)/kappa(i,t);\nValue:=t->Sum(kappa(i)*Number[i],i=1..Numberofitem s);\n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "Max:=t->max(Prof itability(i,t) $i=1..Numberofitems);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 128 "Choice:=proc(t)\nglobal Itemnumber;\nfor i from 1 to Numberofitems do\nif Max(t)=Profitability(i,t)\nthen Itemnumber:=i;\n fi \nod\nend;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 408 "for t fro m 1 to 5 do \ni:='i';\nChoice(t); \n for i from 1 to Numberofitems d o\n Number[i]:=0;\n od:\nNumber[Itemnumber]:=Capital[t]/kappa(Itemn umber,t);\nCapital[t+1]:=Number[Itemnumber]*kappa(Itemnumber,t+1);\npr int(`in time moment `,t, ` I will buy `, evalf(Number[Itemnumber]),\n \+ ` units of commodity number `, Itemnumber, `in time moment`, t+1, `I will have the capital of size`, evalf(Capital[t+1]));\nod:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 361 "At the beginning of the year you start saving. You deposit 114,7 \+ crowns at the beginning of every month and at the end of year you pay \+ tax 1/15 of interests. Interest-rate is 1/50p. m. and the tax from int erests is 1/15 and it is calculated annually. How much will be on the \+ account at the end of 11th year? (you deposit nothing at the end of th e 11-th year )?." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "restart;\nz:=114.7;xi:=1/50; delta:=1/15;\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Per year:" }} {PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx := 12.*z+(sum(z*(1+xi)^t,t = 1 .. 12)-12*z)*(1-delta);" "6#>%$xxxG,&*&-%&FloatG6$\"#7\"\"!\"\"\"%\"zGF, F,*&,&-%$sumG6$*&F-F,),&F,F,%#xiGF,%\"tGF,/F7;F,F*F,*&F*F,F-F,!\"\"F,, &F,F,%&deltaGF;F,F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 18 "In 11 year s- time:" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "\nsum(xxx*(1+xi*(1-delta) )^(12*t),t=0..10);" "6#-%$sumG6$*&%$xxxG\"\"\"),&F(F(*&%#xiGF(,&F(F(%& deltaG!\"\"F(F(*&\"#7F(%\"tGF(F(/F2;\"\"!\"#5" }}}}}{SECT 1 {PARA 0 " " 0 "" {TEXT -1 205 "You calculated with the interest of 20\200 per an num, but then you deposit 23/67 of the deposit less than you planned a nd the interest of 20\200 you will get after 1,5 year. What is the in terest-rate per year? " }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "restart;\nalpha:=44/67; \nalpha:=23/67;" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx:=solve(\{x*(1+ xi)-x=alpha*x*(1+xi)^(3/2)-alpha*x\},xi);" "6#>%$xxxG-%&solveG6$<#/,&* &%\"xG\"\"\",&F-F-%#xiGF-F-F-F,!\"\",&*(%&alphaGF-F,F-),&F-F-F/F-*&\" \"$F-\"\"#F0F-F-*&F3F-F,F-F0F/" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "`interest rate is`, evalf(op(2,op(1,xxx[1]))),`p. a.`;" }}}}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 6 "Test 9" }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 302 "You are saving every month an amount of 120money to your account with the interest-rate 5/100 p. m. In the 17th month your son starts withdrawing from it and every after-going month he withdraws 2 60money(in the same moments when you deposit). How long have you to sa ve to have the amount of 12030money?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; xi \+ := 5/100; xxx := solve(sum(120*(1+xi)^n,n = 0 .. T)+sum((-260)*(1+xi)^ (n-16),n = 16 .. T) = 12030); `sum of money we will save after`, evalf (xxx), `months so almost the whole of it we will have in`, floor(evalf (xxx))+1, ` month`;" "6#C&%(restartG>%#xiG*&\"\"&\"\"\"\"$+\"!\"\">%$x xxG-%&solveG6#/,&-%$sumG6$*&\"$?\"F)),&F)F)F&F)%\"nGF)/F:;\"\"!%\"TGF) -F46$*&,$\"$g#F+F)),&F)F)F&F),&F:F)\"#;F+F)/F:;FGF>F)\"&I?\"6'%@sum~of ~money~we~will~save~afterG-%&evalfG6#F-%Qmonths~so~almost~the~whole~of ~it~we~will~have~inG,&-%&floorG6#-FN6#F-F)F)F)%'~monthG" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 177 "You are repaying a debt of 31415\200 wit h interest-rate of 125/1000(for the payment term), with the payments o f 7777\200. How much will be the last payment lower than the other on es?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "restart;\nZ:=31415:xi:=125/1000:z:=7777;" } }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := Z*(1+xi)^(t-1)- sum(z*(1+xi)^i,i = 0 .. t-1);" "6#>%*equattionG,&*&%\"ZG\"\"\"),&F(F(% #xiGF(,&%\"tGF(F(!\"\"F(F(-%$sumG6$*&%\"zGF(),&F(F(F+F(%\"iGF(/F6;\"\" !,&F-F(F(F.F." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "Debt will have b een repaid after" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "tau:=solve(equa ttion=0,t);evalf(tau);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 42 "payment s, but this is not the round number" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "xxx:=evalf(subs(t=trunc(tau),equattion));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 174 "print(`Debt will be repaid by`,trunc(tau)+1,`pa yments, last payment will be of amount`,xxx*(1+xi),`\200uro, that is a bout`,7777-xxx*(1+xi),`\200uro less, than the other payments`);" }}}}} {SECT 1 {PARA 0 "" 0 "" {TEXT -1 111 "Debt can be repaid by 3 payments of amount A or by 2 payments of amount A*311/210. What is the inflat ion-rate?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "restart;\nequattion:=simplify(sum(z [1]*(1+xi)^t,t=0..T-1)-sum(z[2]*(1+xi)^t,t=0..(T-2)))=0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "#equattion:=xi*equattion;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 123 "sss:=subs(xi=1/10,z[2] = z[ 1]*(3+3*xi+xi^2)/(2+xi));\nequattion2:=subs(T=3,sss,equattion);\nsolve (\{equattion2,xi>0,z[1]>0\});\n" }}}}{PARA 4 "" 0 "" {TEXT -1 0 "" }}} {SECT 1 {PARA 0 "" 0 "" {TEXT -1 108 "Deposits are in proportion 7:8, \+ interest-rates in proportion 8:7. What is the proportion of the inte rests?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "Deposit[1]:=7*A;Deposit[2]:=8*A;\nx i[1]:=8*B;xi[2]:=7*B;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 " Interest[1]:=Deposit[1]*xi[1];\nInterest[2]:=Deposit[2]*xi[2];" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "Interest[1]/Interest[2];" }} }}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 348 "At the beginning of the year \+ you start saving. You deposit 222 crowns at the beginning of every mon th and at the end of year you pay tax 1/15 of interests. Interest-rate is 1/60p. m. and the tax from interests of 1/15 is calculated annuall y. How much will be on the account at the end of 11th year when you de posit nothing at the end of 11th year?)" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 228 "res tart;\nz:=222;xi:=1/60;delta:=1/15;\n`after the first year is saved`\n ,12*z,`profit liable for tax(interest-tax)`,\n(sum(z*(1.+xi)^t,t=1..12 )-12*z),\n`and account status is`,\n12.*z+(sum(z*(1+xi)^t,t=1..12)-12* z)*(1-delta),`crown`;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 142 "f or i from 0 to 9 do\n`after`,i+1,`-th year is saved`,\n#sum((12.*z+(su m(z*(1+xi)^t,t=1..12)-12*z)*(1-delta))*(1+xi)^tau,tau#=0..i),`crown`; \nod;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx:=12.*z+(sum(z*(1+xi)^t,t=1..12)-12*z)*(1-delta); " "6#>%$xxxG,&*&-%&FloatG6$\"#7\"\"!\"\"\"%\"zGF,F,*&,&-%$sumG6$*&F-F, ),&F,F,%#xiGF,%\"tGF,/F7;F,F*F,*&F*F,F-F,!\"\"F,,&F,F,%&deltaGF;F,F," }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "sum(xxx*(1+xi*(1-delta))^ t,t=0..10);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 492 "In January 1118 you had 100 pounds on \+ the account with the compound interest and interest-rate of 1/50 p.a. \+ for time period 1.5 year and 1/25p.a. for time period 1/2 year. Then you deposit another 100 pounds and the interest rates were again 1/5 0 p.a. for time period 1.5 year and 1/25 p.a. for time period 1/2 ye ar. Then you deposit another 100 pounds\205\205etc. In January 1128 yo u deposit nothing anymore and at the end of this year you withdrew eve rything. How much did you withdraw? ? " }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "`You withdrew `,evalf(sum(100*((51/50)^(3/2)*(26/25)^(1/2))^(t),t=1..4)), `pounds`;" }}}}{PARA 4 "" 0 "" {TEXT -1 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 10" }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 313 "Every \+ 20th day of the month you send 700 rupias to your account. After some \+ time period your uncle starts sending monthly 650 rupias ( allways on the sme day of month )to it . On the 30th day of the 27th month is on the account 29990,28 rupias. Interest-rate is 1/20. When did your unc le start sending you money?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Sol ution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "t:=27;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "#T:=12;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "z1:=700; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "z2:=650;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 49 "#for j from 0.04 to 0.08 by 0.005 do; \nxi:=5/ 100;" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion1 := sum(z1* (1+xi)^((10+30*i)/365),i = 0 .. t-1)+sum(z2*(1+xi)^((10+30*i)/365),i = 0 .. t-1-T) = 29990.28;" "6#>%+equattion1G/,&-%$sumG6$*&%#z1G\"\"\"), &F,F,%#xiGF,*&,&\"#5F,*&\"#IF,%\"iGF,F,F,\"$l$!\"\"F,/F5;\"\"!,&%\"tGF ,F,F7F,-F(6$*&%#z2GF,),&F,F,F/F,*&,&F2F,*&F4F,F5F,F,F,F6F7F,/F5;F:,(F< F,F,F7%\"TGF7F,-%&FloatG6$\"(G!**H!\"#" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "`Uncle \+ started sending you money in the`,fsolve(equattion1,T)+1,`month.`;" }} }}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 141 " Quotation(course) of currenc ies (1) jen-min-piao (2) ngultrum and (3) kyata to the Danish crown is in the time moments, t=1,2,3,4,5 equal " }{XPPEDIT 18 0 "kappa(i,t) =9/i+abs(sin(i*t*Pi/6))" "6#/-%&kappaG6$%\"iG%\"tG,&*&\"\"*\"\"\"F'!\" \"F,-%$absG6#-%$sinG6#**F'F,F(F,%#PiGF,\"\"'F-F," }{TEXT -1 112 " (tha t is sum of absolute value of sine of one sixth of the formula: (kind \+ of the concrete currency*time*number " }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 371 ") + number 9/divided kind of concrete currency. This wh ole sum is expressed in Danish crown ) You have 100 Danish crowns and \+ you have accurate knowledge of all quotations in advance. You can cha nge the currencies in actual quotations in the times t=1,2,3,4,5 witho ut any fee. What is the highest amount you can earn by changing money? !!! Note Itemnumber = kind of item" }}{PARA 0 "" 0 "" {TEXT -1 126 " \+ but number of items = how much there are items" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "restart;\nkappa:=(i,t)->9/i+abs(sin (i*t*Pi/6));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 78 "plot(\{kappa(1,t),k appa(2,t),kappa(3,t)\},t=0..6, color=[navy,blue,aquamarine]);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "kappa(1,1);" }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 137 "Numberofitems:=3;\nCapital[1]:=100;\nProfitability:= (i,t)->kappa(i,t+1)/kappa(i,t);\nValue:=t->Sum(kappa(i)*Number[i],i=1. .Numberofitems);\n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "Max :=t->max(Profitability(i,t) $i=1..Numberofitems);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 284 "Choice:=proc(t)\nglobal Itemnumber;\ni:='i' ;\n#print(evalf(Profitability(i,t)) $i=1..Numberofitems);\nfor i from \+ 1 to Numberofitems do\nif Max(t)=Profitability(i,t)\nthen Itemnumber:= i;\n#print(`the highest profitability has the item of kind`,i,`a to`,e valf(Profitability(i,t)));\nfi \nod\nend;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 728 "for t from 1 to 6 do \ni:='i';\nChoice(t); MAX:=e valf(Max(t));#print(MAX);\nif MAX>1 then\n for i from 1 to Numberofit ems do\n Number[i]:=0;\n od:\nNumber[Itemnumber]:=Capital[t]/kappa( Itemnumber,t);\nCapital[t+1]:=Number[Itemnumber]*kappa(Itemnumber,t+1) ;\nprint(`in time moment `,t, ` I will buy `, evalf(Number[Itemnumber] ),\n ` units of currency of kind `, Itemnumber, `in time moment`, t+ 1, `I will have the capital of size`, evalf(Capital[t+1]),`previous cu rrency`);\nelse\nCapital[t+1]:=Capital[t];\nprint(MAX,evalf(Profitabil ity(i,t)) $i=1..Numberofitems,`in time moment`,t,`I will let the money in previous currency , in time moment`, t+1, `I will have the capital of size`, evalf(Capital[t+1]),`of previous currency`)\nfi\nod:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 " " {TEXT -1 185 "We are repaying a debt of 1797 ( value in time moment \+ of the first payment ) pounds with the interest-rate of 1/3 for the pa yment term. The payments are raising so the i-th payment is " } {XPPEDIT 18 0 "1.06^i*300;" "6#*&)-%&FloatG6$\"$1\"!\"#%\"iG\"\"\"\"$+ $F+" }{TEXT -1 217 ". What is the range between the first and and the last payment?( your task is to find out the range (=distance) between the first and last payment if the debt balance( = debt rest ) less th an 1/100 isn't repaid). " }}{PARA 4 "" 0 "" {TEXT -1 1 " " }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 0 "" 0 "" {TEXT -1 153 "Time is measured since the first to the last payment, so for the time period t we have t+1 payments. In the moment of the last payment is the debt repaid" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "Z:=1797;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "xi:=1/3;" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := Z*(1+xi)^t = sum(z(i)*(1+xi)^i,i = 0 .. t);" "6#>%*equattionG/*&% \"ZG\"\"\"),&F(F(%#xiGF(%\"tGF(-%$sumG6$*&-%\"zG6#%\"iGF(),&F(F(F+F(F4 F(/F4;\"\"!F," }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "`Debt we \+ are repaying for`,solve(equattion,t),`period (it is the distance betw een the first and the last payment).`;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 4 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 238 "Write a formula for the amount of the last p ayment, if we are repaying a debt of Z ( in the moment of the first re payment ) with the constantly high payments of z (except of the last p ayment). The inflation rate for the payment term is " }{XPPEDIT 18 0 "xi;" "6#%#xiG" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "restart;\nequattion:=Z*(1+xi)^T-sum(z*(1+xi)^i,i=0..T)=0;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 31 "Tau:=floor(solve(equattion,T));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "xxx:=simplify((1+xi)*subs(T=Tau,op(1,equatt ion)));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 136 "Lastpayment:=(Z ,z,xi)->(1+xi)*(Z*(1+xi)^floor(ln(-z/(Z*xi-z-z*xi))/ln(1+xi))*xi-z*(1+ xi)^(floor(ln(-z/(Z*xi-z-z*xi))/ln(1+xi))+1)+z)/xi;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "Lastpayment(2,1,.1);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 113 "L ast payment is 120\200. \nAll other payments are for 140 .04 \200.\nIn flation rate is 0.123.\nNumber of payments is 22.\n." }}{PARA 0 "" 0 " " {TEXT -1 32 "Debt at the beginning was 1210.5" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "restart;\nz[1]:=144.04;\nz[2]:=119.75;\nxi:=0.123;\nT:=21;" }}} {EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart;\nxxx:=simplify((sum(z [1]*(1+xi)^i,i=0..T-1)*(1+xi)+z[2])*(1+xi)^(-T));" "6#C$%(restartG>%$x xxG-%)simplifyG6#*&,&*&-%$sumG6$*&&%\"zG6#\"\"\"F4),&F4F4%#xiGF4%\"iGF 4/F8;\"\"!,&%\"TGF4F4!\"\"F4,&F4F4F7F4F4F4&F26#\"\"#F4F4),&F4F4F7F4,$F =F>F4" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "solve(subs(\nz[1]= 144.04,\nz[2]=119.75,\nxi=0.123,\nT=21,\nxxx=1210.5\n));" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx:=sum(140*1.123^t,t=1..21)+120;" " 6#>%$xxxG,&-%$sumG6$*&\"$S\"\"\"\")-%&FloatG6$\"%B6!\"$%\"tGF+/F2;F+\" #@F+\"$?\"F+" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "xxx/1.123^( 21);" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "`The size of debt is` ,sum(140*1.123^(-t),t = 0 .. 20)+120*1.123^(-21);" "6$%4The~size~of~de bt~isG,&-%$sumG6$*&\"$S\"\"\"\")-%&FloatG6$\"%B6!\"$,$%\"tG!\"\"F*/F2; \"\"!\"#?F**&\"$?\"F*)-F-6$F/F0,$\"#@F3F*F*" }}}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 258 19 "\267In time moment t ," }{XPPEDIT 18 0 "t,epsilon,< 0,1>;" "6%%\"tG%(epsilonG-%$<,>G6$\"\"!6#\"\"\"" }{TEXT 259 196 " you \+ can invest random amount X and in the time moment 1 you get back f(X,t ). For random period we can let the money valuate.\n\267\011What is th e rate of profit of the amount of 100 in time moment 0.25 " }{TEXT 260 544 " \+ \267\011How many times better is to inves t amount of 13 in the time moment 0.25 than to let the money ear n interests for the same time period with the interest rate 1/5 for the time unit?(quantify it).\n\267\011How high should be the investme nt and it which time moment should it be done , if we want to achieve the maximal proportion between the investment and alternative investm ent ( alternative investment is saving with interest rate 1/5 per time unit?" }{TEXT -1 1 "\n" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solutio n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 222 "`to i nvest 100 in the time moment 1/4 is in the time moment 1`, evalf(Profi tability(100,1/4,1/5)),`times better, than let the money earn interest s by interest-rate`, 1/5;\n#evalf(Profitability(100,1/4,0)/(100*(6/5)^ (3/4)));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "#evalf(Profitab ility(exp(1), 1/2+1/2*ln(6/5)));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "\n\n" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "\n#Profitability:=(x,t)->exp(-(16- x)^2)*exp(-(1-t)^2/3)*x^(-1)*(1+xi)^(1-t);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 152 "#Profitability:=(x,t)->ln(x)*exp(-(1/2-t)^2)/(x*(1 +xi)^(1-t)); \n\nsimplify(diff(Profitability(x,t,1/5),x))=0,\nsimplify (diff(Profitability(x,t,1/5),t))=0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "xxx:=solve(\{diff(Profitability(x,t,1/5),x)=0,\ndiff( Profitability(x,t,1/5),t)=0\},\{x,t\});\nevalf(xxx);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "evalf(subs(xxx,hessian(Profitability(x,t, 1/5),[x,t])));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "gradient:=grad((Pr ofitability)(x,t),vector([x,t]));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "solve(gradient[1]=0);\nsolve(gradient[2]=0);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot((1+xi)^(1-t),t=0..1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "evalf(solve(1/ln(alpha)=1 3));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT 256 336 "We must repay the debt within one year . We will repay it in equi-distant( = equal) terms, first payment will be on the first day of the year and the last on the last day of the y ear. Interest for the 1/12 of the year is 1/5. Debt can be repaid by 3 payments of 108 or it can be repaid by 4 payments. How much it will b e for 4 payments?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "Distance between 2 consecutive(af ter going) equal terms from n terms is in time period of length T :" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "restart;Distance:=(n,T)->(T)/(n-1) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "The value of the debt in the moment of its repaying by n payments is:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "Value:=(n,T,z,xi)->simplify(sum(z*(1+xi)^(i*Distance( n,T)),i=0..n-1));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "evalf(Distance (3,12));\nequattion1:=Value(3,12,108,1/5)=Z;\n" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 104 "ZZ:=simplify(solve(equattion1)):\n`The value \+ of the debt in the moment of its repaying is `, Z=evalf(ZZ);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "zz:=simplify(solve(Value(4,1 2,z,1/5)=ZZ));\n`The height of every of four payments is`, evalf(zz); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "1393.425120*(1+1/5)^(-1 2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 7 "Test 11" }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 18 "You deposit every " }{XPPEDIT 18 0 "120*1.2^i;" "6#*&\"$?\"\"\" \")-%&FloatG6$\"#7!\"\"%\"iGF%" }{TEXT -1 364 "-th day of your life, \+ i=0..120 an amount of 17 \200. Interest rate is 1/5 p.a. How many year s are you going to deposit? How much will you have saved after 56 year s of life since the moment of the first input? (it will be enough to w rite it into one formula, you do not have to quantify it)? In this ta sk what do we use- short-term saving or before-term saving?" }} {SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "xxx:=Sum(120*(12/10)^i,i=1..120)/(365+1/4):" "6#>%$xxxG*&-%$SumG6$* &\"$?\"\"\"\")*&\"#7F+\"#5!\"\"%\"iGF+/F1;F+F*F+,&\"$l$F+*&F+F+\"\"%F0 F+F0" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "yyy:=17*Sum((6/5)^(-120*(12/1 0)^i/(365+1/4)),i=0..17):\nevalf(yyy);" "6#C$>%$yyyG*&\"#<\"\"\"-%$Sum G6$)*&\"\"'F(\"\"&!\"\",$*(\"$?\"F()*&\"#7F(\"#5F0%\"iGF(,&\"$l$F(*&F( F(\"\"%F0F(F0F0/F8;\"\"!F'F(-%&evalfG6#F%" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 189 "`Last input we will deposit on `,xxx=evalf(xxx),`d ay of our life and after 36 years, whose average length is 365+1/4 day s we will have saved`, `(6/5)`^365*yyy=evalf(yyy)*(6/5)^365,`\200uro `;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 0 "" 0 " " {TEXT -1 32 "You deposit in the time moment " }{XPPEDIT 18 0 "i*120 ;" "6#*&%\"iG\"\"\"\"$?\"F%" }{TEXT -1 8 " days, " }{XPPEDIT 18 0 "i= 0..19" "6#/%\"iG;\"\"!\"#>" }{TEXT -1 1 " " }{TEXT -1 12 " amount of \+ " }{XPPEDIT 18 0 "120*1.2^i;" "6#*&\"$?\"\"\"\")-%&FloatG6$\"#7!\"\"% \"iGF%" }{TEXT -1 57 " units. How much you will have saved in the time moment " }{XPPEDIT 18 0 "T = 2400;" "6#/%\"TG\"%+C" }{TEXT -1 48 " d ays, if the interest rate is 1/6 for 120days?." }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 8 "solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "restart;T:=2400;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "\nxxx:=Sum(120*1.2^i*(7/6)^(T-i*120), i=0..19):" "6#>%$xxxG-%$SumG6$*(\"$?\"\"\"\")-%&FloatG6$\"#7!\"\"%\"iG F*)*&\"\"(F*\"\"'F0,&%\"TGF**&F1F*F)F*F0F*/F1;\"\"!\"#>" }}{PARA 0 "" 0 "" {TEXT -1 37 "is a geometric row with the quotient:" }}}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "simplify(subs(i = i+1,120*1.2^i*(7/6) ^(T-i*120))/(120*1.2^i*(7/6)^(T-i*120)));" "6#-%)simplifyG6#*&-%%subsG 6$/%\"iG,&F+\"\"\"F-F-*(\"$?\"F-)-%&FloatG6$\"#7!\"\"F+F-)*&\"\"(F-\" \"'F5,&%\"TGF-*&F+F-F/F-F5F-F-*(F/F-)-F26$F4F5F+F-)*&F8F-F9F5,&F;F-*&F +F-F/F-F5F-F5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 46 "Its first member (=the first member of the row)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "e valf(subs(i=0,120*1.2^i*(7/6)^(T-i*120)));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 108 "`In th e moment of 120 days from the start (first input is time moment 0)we \+ will have saved`,xxx=evalf(xxx);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 236 "With the equal payments of 13,5 SKK(Slovak crowns) you repay t he debt with 22 payments. If the 19th payment will be 1.5 times higher , then the debt can be repaid with only 21 payments. How high is the i nterest rate for the payment term?" }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 8 "solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 148 "restart; \nz:=135/10;\n#xi:=1/4;\nequattion:=sum(z*(1+xi)^(-i),i=0..21)-sum(z*( 1+xi)^(-i),i=0..20)-1/2*z*(1+xi)^(1-T);\nfor xi from .01 by .01 to .75 do " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 105 "if abs(round(solve(equatti on))-solve(equattion))<10^(-3) then\nprint('xi'=xi,'T'=solve(equattion ));\nfi\nod:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 200 "restart;\n #xi := 26/100; \nT := 19; z:=135/10;\nequattion:=sum(z*(1+xi)^(-i),i=0 ..21)-sum(z*(1+xi)^(-i),i=0..20)-z/2*(1+xi)^(1-T);\n`Interest rate for the payment term is`, evalf(solve(\{equattion,xi>0\}));" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 30 " Index of consumer-prices is " } {XPPEDIT 18 0 "100+exp(t/5)" "6#,&\"$+\"\"\"\"-%$expG6#*&%\"tGF%\"\"&! \"\"F%" }{TEXT -1 203 ", where t ist he number of month. You should se t the average inflation rate per year for the months 1,2,3 and year-in flation rate(supposing that the index is being defined at the beginnin g of the month)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 0 " " 0 "" {TEXT -1 8 "solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "ICP:=t->100+exp(t/5);\nplot(ICP(t),t=0..4);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 97 "`The average year-inflation rate for the first three months is`,\nevalf((ICP(4)/ICP(1))^(12/3))-1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "`Year-inflation rate is`,\nevalf((ICP(13) /ICP(1)))-1;" }}}}}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 273 "With the inte rest rate of 1/4 (for the term of distance between two consecutive goi ng payments) will you repay the debt with 17 payments with size of 12. 5 and the 18th payment with size of 7. How high must be the 3rd paym ent , so that the other 17 payments will be 12.5?" }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart; T := 17; z := 12.5; zk := 7.0; xi := 1/4; equattion := sum (z*(1+xi)^(i+1),i = 0 .. T-1)+zk = sum(z*(1+xi)^i,i = 0 .. T)+(x-z)*(1 +xi)^(T-3+1);" "6#C(%(restartG>%\"TG\"#<>%\"zG-%&FloatG6$\"$D\"!\"\">% #zkG-F+6$\"#qF.>%#xiG*&\"\"\"F7\"\"%F.>%*equattionG/,&-%$sumG6$*&F)F7) ,&F7F7F5F7,&%\"iGF7F7F7F7/FD;\"\"!,&F&F7F7F.F7F0F7,&-F>6$*&F)F7),&F7F7 F5F7FDF7/FD;FGF&F7*&,&%\"xGF7F)F.F7),&F7F7F5F7,(F&F7\"\"$F.F7F7F7F7" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "`the third payment has to be of size`,solve(equattion );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 14 "The remainings" }}{SECT 1 {PARA 0 "" 0 "" {TEXT -1 1313 "One man counted his debt and took into consideration th e payments of constant (= the same ) height.. He found out that he wil l be repaying 12 months, but this result was wrong , because he used \+ bad formula for his counting. The formula he used was better for count ing penalty for delay . That formula is for the situation when we are \+ repaying after the payment date , and penalty is counted as the intere st from the remaining (=the rest). In principle this is simple interes t , when the interests are added to the debt in the same time moments , when the debt is repaid (the first one is added in time moment of t he first payment), but they are not valuated in the future any more ( \+ so it is not compound interest).At first the debt is repaid by this wa y and then are the penalties repaid, but the repaying of penalties i s not penalized any more. On the other hand , in reality creditor ( = \+ person who loaned ) demanded the interests from the interests. How man y payments longer took the paying of the debt in comparison ( = com pared to ) his previous assumption? ( your task is to express number of payments as dependent on parameters , express it as decimal num ber , so it doesn't have to be round number). Interest rate is 1/4, th e previous number of payments ( calculated by the wrong way) was 14." }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "restart:" "6#%(restartG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "Previously , he had to pay n paym ents, their height in time moment of paying would be:" }}{PARA 0 "> " 0 "" {XPPEDIT 19 1 "equattion := simplify(Z+sum((Z-i*z)*xi,i = 1 .. Z/ z) = n*z);" "6#>%*equattionG-%)simplifyG6#/,&%\"ZG\"\"\"-%$sumG6$*&,&F *F+*&%\"iGF+%\"zGF+!\"\"F+%#xiGF+/F2;F+*&F*F+F3F4F+*&%\"nGF+F3F+" }} {PARA 0 "" 0 "" {TEXT -1 81 "where Z is the previous height of the de bt and z is the height of the payments." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "So the height of the debt is" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "Z:=solve(equattion,Z);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "evalf(subs(xi=1/4,n=14,Z[1]));\nevalf(subs(xi=1/4,n=1 4,Z[2]));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 149 "Second root here is lower than 0.\nIt is after-deadline( = after -term) repaying (the fi rst interest was counted in time moment of the 1-th payment)\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "equattion:=Z[1]*(1+xi)^n=sum (z*(1+xi)^i,i=0..m-1); #equattion:=simplify(equattion);" }}{PARA 11 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "N:=s implify(solve(equattion,m));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 32 "xxx:=evalf(subs(xi=1/4,n=14,N));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 131 "print(`The repaying will take `,trunc(x xx),`time periods and then yet another one, but the last payment will be a lot smaller.`);" }}}}}{PARA 3 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 258 "" 0 "" {TEXT -1 310 "Supermarket offers you discount 10% of goods, ( well, of course supermarket has recently quickly risen the price of these goods by 10%, and they are now offered by 10 % disc ount .) Previously the price was 7 threescores ( threescore = 60 ) of \+ units of money. How much will you pay , if you will buy them?" }} {SECT 1 {PARA 5 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {XPPEDIT 19 1 "`we will have to pay`,7*60*(1+10/100)*(1-10/100),uni ts;" "6%%4we~will~have~to~payG**\"\"(\"\"\"\"#gF&,&F&F&*&\"#5F&\"$+\"! \"\"F&F&,&F&F&*&F*F&F+F,F,F&%&unitsG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}}{PARA 3 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "0 2 1 3 1 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }