Math 126 Assignment 5
Q1) a:Plot the functions y = 3x and y = (1/3) x on the same graph b: Plot the functions 1.1x, ⅇx, 10he me graph
Math 126 Assignment 5
Q1) a:Plot the functions y = 3x and y = (1/3) x on the same graph b: Plot the functions 1.1x, ⅇx, 10he me graph
Q1) a:Plot the functions y = 3x and y = (1/3) x on the same graph b: Plot the functions 1.1x, ⅇx, 10he me graph
Q1) :Plot the functions y = 3x and y = (1/3) x on the same graph b: Plot the functions 1.1x , ⅇx , 10x on the same graph
Plot[{3^x,(1/3)^x},{x,-3,3}]
Out[]=
Plot[{1.1^x,Exp[x],10^x},{x,-3,3}]
Out[]=
qQ2) Use this to compute ⅇ to 30 places. Compare with N[ⅇ,30]. What n will do this rounded up
to the nearest power of 10? Hint: make a table where n is increasing powers of 10 When the thirty
digit number ceases to change you will have found the thirty digit approximation and the n can be
found by cutting down.
to the nearest power of 10? Hint: make a table where n is increasing powers of 10 When the thirty
digit number ceases to change you will have found the thirty digit approximation and the n can be
found by cutting down.
Table[{n,N[(N[1,100]+1/10^n)^(10^n),30]},{n,1,50}]N[Exp[1],30]
Out[]=
{{1,2.59374246010000000000000000000},{2,2.70481382942152609326719471081},{3,2.71692393223589245738308812195},{4,2.71814592682522486403766467491},{5,2.71826823717448966803506482443},{6,2.71828046931937688381979970845},{7,2.71828169254496627119855022578},{8,2.71828181486763621765297724301},{9,2.71828182709990432237664402386},{10,2.71828182832313114394979400130},{11,2.71828182844545382621811683309},{12,2.71828182845768609444605919461},{13,2.71828182845890932126886453155},{14,2.71828182845903164395114517625},{15,2.71828182845904387621937324183},{16,2.71828182845904509944619604840},{17,2.71828182845904522176887832906},{18,2.71828182845904523400114655712},{19,2.71828182845904523522437337993},{20,2.71828182845904523534669606221},{21,2.71828182845904523535892833044},{22,2.71828182845904523536015155726},{23,2.71828182845904523536027387994},{24,2.71828182845904523536028611221},{25,2.71828182845904523536028733544},{26,2.71828182845904523536028745776},{27,2.71828182845904523536028746999},{28,2.71828182845904523536028747122},{29,2.71828182845904523536028747134},{30,2.71828182845904523536028747135},{31,2.71828182845904523536028747135},{32,2.71828182845904523536028747135},{33,2.71828182845904523536028747135},{34,2.71828182845904523536028747135},{35,2.71828182845904523536028747135},{36,2.71828182845904523536028747135},{37,2.71828182845904523536028747135},{38,2.71828182845904523536028747135},{39,2.71828182845904523536028747135},{40,2.71828182845904523536028747135},{41,2.71828182845904523536028747135},{42,2.71828182845904523536028747135},{43,2.71828182845904523536028747135},{44,2.71828182845904523536028747135},{45,2.71828182845904523536028747135},{46,2.71828182845904523536028747135},{47,2.71828182845904523536028747135},{48,2.71828182845904523536028747135},{49,2.71828182845904523536028747135},{50,2.71828182845904523536028747135}}
Out[]=
2.71828182845904523536028747135
Q3) For what n does f(n)=∑i=0 n 1/i! give the first 30 digits of ⅇ?
f[n_]:=Sum[1/i!,{i,0,n}]Table[{n,N[f[n],30]},{n,1,50}]
Out[]=
{{1,2.00000000000000000000000000000},{2,2.50000000000000000000000000000},{3,2.66666666666666666666666666667},{4,2.70833333333333333333333333333},{5,2.71666666666666666666666666667},{6,2.71805555555555555555555555556},{7,2.71825396825396825396825396825},{8,2.71827876984126984126984126984},{9,2.71828152557319223985890652557},{10,2.71828180114638447971781305115},{11,2.71828182619849286515953182620},{12,2.71828182828616856394634172412},{13,2.71828182844675900231455787011},{14,2.71828182845822974791228759483},{15,2.71828182845899446428546957647},{16,2.71828182845904225905879345033},{17,2.71828182845904507051604779585},{18,2.71828182845904522670811748171},{19,2.71828182845904523492875272834},{20,2.71828182845904523533978449067},{21,2.71828182845904523535935743173},{22,2.71828182845904523536024711087},{23,2.71828182845904523536028579257},{24,2.71828182845904523536028740431},{25,2.71828182845904523536028746878},{26,2.71828182845904523536028747126},{27,2.71828182845904523536028747135},{28,2.71828182845904523536028747135},{29,2.71828182845904523536028747135},{30,2.71828182845904523536028747135},{31,2.71828182845904523536028747135},{32,2.71828182845904523536028747135},{33,2.71828182845904523536028747135},{34,2.71828182845904523536028747135},{35,2.71828182845904523536028747135},{36,2.71828182845904523536028747135},{37,2.71828182845904523536028747135},{38,2.71828182845904523536028747135},{39,2.71828182845904523536028747135},{40,2.71828182845904523536028747135},{41,2.71828182845904523536028747135},{42,2.71828182845904523536028747135},{43,2.71828182845904523536028747135},{44,2.71828182845904523536028747135},{45,2.71828182845904523536028747135},{46,2.71828182845904523536028747135},{47,2.71828182845904523536028747135},{48,2.71828182845904523536028747135},{49,2.71828182845904523536028747135},{50,2.71828182845904523536028747135}}
Q4) a:After 4.27 minutes 99.99% of a radio-active substance is present. What is the half-life of
the radio-active substance b: How long will it take 80% of the substance to be present
For a), you want to solve for h where a(t) = .9999 and t = 4.27. For b), you want to solve for t
where a(t) = .8 and you use the value for h that you found in part a).
the radio-active substance b: How long will it take 80% of the substance to be present
For a), you want to solve for h where a(t) = .9999 and t = 4.27. For b), you want to solve for t
where a(t) = .8 and you use the value for h that you found in part a).
Solve[0.9999==2^(-4.27/h),h]//N
Out[]=
{{h29595.9}}
hVal=h/.First[%];Solve[0.8==2^(-t/hVal),t]//N
Out[]=
{{t9527.75}}
The half life of the radio active substance is roughly 29600. In addition, it will take rougly 9527 minutes for it tpo reach 80%
Q5) a: Without Reduce solve the inequality ⅇx
x1000 ≥ 2. Use the fact that the le�-hand side of the
graph has no jumps in it to give an interval which is unbounded to the right on which the le� hand
side is greater than 2. Explain your reasoning.
b: Now solve the inequality using Reduce. (This might take some time). Look up the Timing comand,
TT p 41 and give the time it takes to solve using Reduce,and the solution.
Q5) a: Without Reduce solve the inequality ⅇx
x1000 ≥ 2. Use the fact that the le�-hand side of the
graph has no jumps in it to give an interval which is unbounded to the right on which the le� hand
side is greater than 2. Explain your reasoning.
b: Now solve the inequality using Reduce. (This might take some time). Look up the Timing comand,
TT p 41 and give the time it takes to solve using Reduce,and the solution.
NSolve[Exp[x]==2*x^1000,x]
Out[]=
{{x-0.997819+0.0313264},{x-0.997996+0.0250626},{x-0.998133+0.0187978},{x-0.998231+0.0125323},{x-0.99829+0.00626627},{x-0.99831},{x-0.99829-0.00626627},{x-0.998231-0.0125323},{x-0.998133-0.0187978},{x-0.997996-0.0250626},{x-0.997819-0.0313264},{x-0.997603-0.037589},{x-0.997347-0.0438501},{x-0.997053-0.0501095},{x-0.996719-0.0563669},{x-0.996346-0.0626221}}
This function is continuous which is why there isn’t a jump. In addition,
Timing[Reduce[Exp[x]/x^1000>=2,x]//N]
Out[]=
{0.021189,-0.99831≤x<0.||0.<x≤1.00031||x≥9118.78}
Q6) Given an interest rate of 2%=.02 what is the nominal interest rate of 2% a: compounded
quarterly
(4 times a year),b: daily and c: continuously
Q6) Given an interest rate of 2%=.02 what is the nominal interest rate of 2% a: compounded
quarterly
(4 times a year),b: daily and c: continuously
quarterly
(4 times a year),b: daily and c: continuously
r=0.02;
Quarterly:
(1+r/4)^4-1
Out[]=
0.0201505
Daily:
(1+r/365)^365-1
Out[]=
0.0202008
Continuous:
E^r-1
Out[]=
0.0202013
Q7) Problem 7 use Mathematica to check the change of basis theorem for logarithms: Log[b, x] = Log[a,x
Q8)Compute the a +b ⅈ form of Log[-8], and Log[a+b ⅈ] for a,b real. Look up Arg in the documentation center
Q9) : We can use the Table command to find the numerical value of the inverse of a function at
a point. Use the Table command to find Log[2] rounded to to five places.
Hint: You want to find the value of x rounded to 5 decimal places for which ⅇx is close to 2 since
ⅇLog[2] = 2. As a start, we can use the command (where I have replaced x with the iterator i which is
more usual for the Table command and is not to be confused with the imaginary ⅈ)
a point. Use the Table command to find Log[2] rounded to to five places.
Hint: You want to find the value of x rounded to 5 decimal places for which ⅇx is close to 2 since
ⅇLog[2] = 2. As a start, we can use the command (where I have replaced x with the iterator i which is
more usual for the Table command and is not to be confused with the imaginary ⅈ)
