(*^ ::[ Information = "This is a Mathematica Notebook file. It contains ASCII text, and can be transferred by email, ftp, or other text-file transfer utility. It should be read or edited using a copy of Mathematica or MathReader. If you received this as email, use your mail application or copy/paste to save everything from the line containing (*^ down to the line containing ^*) into a plain text file. On some systems you may have to give the file a name ending with ".ma" to allow Mathematica to recognize it as a Notebook. The line below identifies what version of Mathematica created this file, but it can be opened using any other version as well."; FrontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.2"; MacintoshStandardFontEncoding; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e8, 24, "Times"; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e6, 18, "Times"; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, e6, 14, "Times"; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, a20, 18, "Times"; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, a15, 14, "Times"; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, "Times"; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L-5, 12, "Courier"; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L-5, 12, "Courier"; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B65535, L-5, 12, "Courier"; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, 12, "Courier"; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, "Geneva"; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = leftheader, inactive, L2, 12, "Times"; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, 12, "Times"; fontset = leftfooter, inactive, L2, 12, "Times"; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; paletteColors = 128; automaticGrouping; currentKernel; ] :[font = input; initialization; preserveAspect] *) Exercises on Differential Operators (* :[font = input; initialization; preserveAspect] *) Exercise 1 (* :[font = input; initialization; preserveAspect] *) L[i_]:=If[i==1,D[f[x],x]-f[x],D[L[i-1],x]-i L[i-1]] (* :[font = input; initialization; preserveAspect; startGroup] *) Do[Print[DSolve[{L[5]==0,{f[0],f'[0],f''[0],f'''[0],f''''[0]} \ ==IdentityMatrix[5][[i]]},f[x],x]],{i,5}] (* :[font = message; inactive; preserveAspect] DSolve::dsdeg: Warning: Differential equation of order higher than four encountered. DSolve may not be able to find the solution. :[font = print; inactive; preserveAspect; endGroup] x 2 x 3 x 4 x 5 x {{f[x] -> 5 E - 10 E + 10 E - 5 E + E }} x 2 x 3 x 4 x 5 x -77 E 107 E 39 E 61 E 25 E {{f[x] -> ------ + -------- - ------- + ------- - -------}} 12 6 2 6 12 x 2 x 3 x 4 x 5 x 71 E 59 E 49 E 41 E 35 E {{f[x] -> ----- - ------- + ------- - ------- + -------}} 24 6 4 6 24 x 2 x 4 x 5 x -7 E 13 E 3 x 11 E 5 E {{f[x] -> ----- + ------- - 3 E + ------- - ------}} 12 6 6 12 x 2 x 3 x 4 x 5 x E E E E E {{f[x] -> -- - ---- + ---- - ---- + ----}} 24 6 4 6 24 :[font = input; initialization; preserveAspect] *) Exercise 2 a) (* :[font = input; initialization; preserveAspect; startGroup] *) DSolve[f''[x]-3f'[x]-4f[x]==e^x,f[x],x] (* :[font = output; output; inactive; preserveAspect; endGroup] {{f[x] -> C[1]/E^x + E^(4*x)*C[2] + e^x*(1/(5*(-4 + Log[e])) - 1/(5*(1 + Log[e])))}} ;[o] C[1] 4 x {{f[x] -> ---- + E C[2] + x E x 1 1 e (--------------- - --------------)}} 5 (-4 + Log[e]) 5 (1 + Log[e]) :[font = input; initialization; preserveAspect; startGroup] *) DSolve[f''[x]-3f'[x]-4f[x]==0,f[x],x] (* :[font = output; output; inactive; preserveAspect; endGroup] {{f[x] -> C[1]/E^x + E^(4*x)*C[2]}} ;[o] C[1] 4 x {{f[x] -> ---- + E C[2]}} x E :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) DSolve[f'[x]-4f[x]==0,f[x],x] (* :[font = output; output; inactive; preserveAspect; endGroup] {{f[x] -> E^(4*x)*C[1]}} ;[o] 4 x {{f[x] -> E C[1]}} :[font = input; initialization; preserveAspect; startGroup] *) DSolve[f'[x]+f[x]==0,f[x],x] (* :[font = output; output; inactive; preserveAspect; endGroup] {{f[x] -> C[1]/E^x}} ;[o] C[1] {{f[x] -> ----}} x E :[font = input; initialization; preserveAspect] *) We notice that the solution of the homogeneous equation in part (a) is a linear combination of the solutions in part (b). (* :[font = input; initialization; preserveAspect] *) Exercise 3 (* :[font = input; initialization; preserveAspect] *) Clear[f,L] F[f_]:=D[f,x]-2f L[f_]:=F[F[F[f]]] (* :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect; startGroup] *) L[E^(2x)] (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect; startGroup] *) L[x E^(2x)] (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect; startGroup] *) L[x^2 E^(2x)] (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) L[f[x]]//Expand (* :[font = output; output; inactive; preserveAspect; endGroup] -8*f[x] + 12*Derivative[1][f][x] - 6*Derivative[2][f][x] + Derivative[3][f][x] ;[o] (3) -8 f[x] + 12 f'[x] - 6 f''[x] + f [x] :[font = input; initialization; preserveAspect; startGroup] *) f[x]/.DSolve[L[f[x]]==0,f[x],x] (* :[font = output; output; inactive; preserveAspect; endGroup] {E^(2*x)*C[1] + E^(2*x)*x*C[2] + E^(2*x)*x^2*C[3]} ;[o] 2 x 2 x 2 x 2 {E C[1] + E x C[2] + E x C[3]} :[font = input; initialization; preserveAspect; startGroup] *) B=Table[(%[[1]]-(%[[1]]/.{C[i]->0}))/.{C[i]->1},{i,3}] (* :[font = output; output; inactive; preserveAspect; endGroup] {E^(2*x), E^(2*x)*x, E^(2*x)*x^2} ;[o] 2 x 2 x 2 x 2 {E , E x, E x } :[font = input; initialization; preserveAspect; startGroup] *) M=Table[D[B[[j]],{x,i-1}],{i,3},{j,3}]; M//TableForm (* :[font = output; output; inactive; preserveAspect; endGroup] TableForm[{{E^(2*x), E^(2*x)*x, E^(2*x)*x^2}, {2*E^(2*x), E^(2*x) + 2*E^(2*x)*x, 2*E^(2*x)*x + 2*E^(2*x)*x^2}, {4*E^(2*x), 4*E^(2*x) + 4*E^(2*x)*x, 2*E^(2*x) + 8*E^(2*x)*x + 4*E^(2*x)*x^2}}] ;[o] 2 x 2 x 2 x 2 E E x E x 2 x 2 x 2 x 2 x 2 x 2 2 E E + 2 E x 2 E x + 2 E x 2 x 2 x 2 x 2 x 2 x 2 x 2 4 E 4 E + 4 E x 2 E + 8 E x + 4 E x :[font = input; initialization; preserveAspect; startGroup] *) W[0]=Det[M]/.{x->0} (* :[font = output; output; inactive; preserveAspect; endGroup] 2 ;[o] 2 :[font = input; initialization; preserveAspect] *) We can now conclude that the solutions in part (a) are a basis for the kernel of L, taking also into account the fact that the kernel has dimension 3. (* :[font = input; initialization; preserveAspect] *) c) We can conjecture that (x^i)E^(r x) , with 0 <= i < f , will be solutions. (* :[font = input; initialization; preserveAspect] *) L[f_]:=F[F[F[F[F[f]]]]] (* :[font = input; initialization; preserveAspect; startGroup] *) Do[Print[L[x^i E^(2x)]//Expand],{i,0,4}] (* :[font = print; inactive; preserveAspect; endGroup] 0 0 0 0 0 :[font = input; initialization; preserveAspect] *) Exercise 4 a) (* :[font = input; initialization; preserveAspect] *) Clear[f,L] F1[f_]:=D[f,x]+2f F2[f_]:=F1[F1[f]]+3^2f L[f_]:=F2[F2[F2[f]]] (* :[font = input; initialization; preserveAspect; startGroup] *) L[x^i E^(-2x)Cos[3x]]//Expand/.{i->{0,1,2}} (* :[font = output; output; inactive; preserveAspect; endGroup] (-120*i*x^(-6 + i)*Cos[3*x])/E^(2*x) + (274*i^2*x^(-6 + i)*Cos[3*x])/E^(2*x) - (225*i^3*x^(-6 + i)*Cos[3*x])/E^(2*x) + (85*i^4*x^(-6 + i)*Cos[3*x])/E^(2*x) - (15*i^5*x^(-6 + i)*Cos[3*x])/E^(2*x) + (i^6*x^(-6 + i)*Cos[3*x])/E^(2*x) + (648*i*x^(-4 + i)*Cos[3*x])/E^(2*x) - (1188*i^2*x^(-4 + i)*Cos[3*x])/E^(2*x) + (648*i^3*x^(-4 + i)*Cos[3*x])/E^(2*x) - (108*i^4*x^(-4 + i)*Cos[3*x])/E^(2*x) - (432*i*x^(-5 + i)*Sin[3*x])/E^(2*x) + (900*i^2*x^(-5 + i)*Sin[3*x])/E^(2*x) - (630*i^3*x^(-5 + i)*Sin[3*x])/E^(2*x) + (180*i^4*x^(-5 + i)*Sin[3*x])/E^(2*x) - (18*i^5*x^(-5 + i)*Sin[3*x])/E^(2*x) + (432*i*x^(-3 + i)*Sin[3*x])/E^(2*x) - (648*i^2*x^(-3 + i)*Sin[3*x])/E^(2*x) + (216*i^3*x^(-3 + i)*Sin[3*x])/E^(2*x) ;[o] -6 + i 2 -6 + i -120 i x Cos[3 x] 274 i x Cos[3 x] ----------------------- + ----------------------- - 2 x 2 x E E 3 -6 + i 4 -6 + i 225 i x Cos[3 x] 85 i x Cos[3 x] ----------------------- + ---------------------- - 2 x 2 x E E 5 -6 + i 6 -6 + i 15 i x Cos[3 x] i x Cos[3 x] ---------------------- + ------------------- + 2 x 2 x E E -4 + i 2 -4 + i 648 i x Cos[3 x] 1188 i x Cos[3 x] ---------------------- - ------------------------ + 2 x 2 x E E 3 -4 + i 4 -4 + i 648 i x Cos[3 x] 108 i x Cos[3 x] ----------------------- - ----------------------- - 2 x 2 x E E -5 + i 2 -5 + i 432 i x Sin[3 x] 900 i x Sin[3 x] ---------------------- + ----------------------- - 2 x 2 x E E 3 -5 + i 4 -5 + i 630 i x Sin[3 x] 180 i x Sin[3 x] ----------------------- + ----------------------- - 2 x 2 x E E 5 -5 + i -3 + i 18 i x Sin[3 x] 432 i x Sin[3 x] ---------------------- + ---------------------- - 2 x 2 x E E 2 -3 + i 3 -3 + i 648 i x Sin[3 x] 216 i x Sin[3 x] ----------------------- + ----------------------- 2 x 2 x E E :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) L1[i_]:=L[x^i E^(-2x)Sin[3x]]//Expand L2[i_]:=L[x^i E^(-2x)Cos[3x]]//Expand Do[Print[L1[i],",",L2[i]],{i,0,2}] (* :[font = print; inactive; preserveAspect; endGroup] 0,0 0,0 0,0 :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) L[f[x]]//Expand (* :[font = output; output; inactive; preserveAspect; endGroup] 2197*f[x] + 2028*Derivative[1][f][x] + 1131*Derivative[2][f][x] + 376*Derivative[3][f][x] + 87*Derivative[4][f][x] + 12*Derivative[5][f][x] + Derivative[6][f][x] ;[o] (3) 2197 f[x] + 2028 f'[x] + 1131 f''[x] + 376 f [x] + (4) (5) (6) 87 f [x] + 12 f [x] + f [x] :[font = input; initialization; preserveAspect; startGroup] *) f[x]/.DSolve[L[f[x]]==0,f[x],x] (* :[font = message; inactive; preserveAspect] DSolve::dsdeg: Warning: Differential equation of order higher than four encountered. DSolve may not be able to find the solution. :[font = output; output; inactive; preserveAspect; endGroup] {(C[2]*Cos[3*x])/E^(2*x) + (x*C[4]*Cos[3*x])/E^(2*x) + (x^2*C[6]*Cos[3*x])/E^(2*x) - (C[1]*Sin[3*x])/E^(2*x) - (x*C[3]*Sin[3*x])/E^(2*x) - (x^2*C[5]*Sin[3*x])/E^(2*x)} ;[o] 2 C[2] Cos[3 x] x C[4] Cos[3 x] x C[6] Cos[3 x] {------------- + --------------- + ---------------- - 2 x 2 x 2 x E E E 2 C[1] Sin[3 x] x C[3] Sin[3 x] x C[5] Sin[3 x] ------------- - --------------- - ----------------} 2 x 2 x 2 x E E E :[font = input; initialization; preserveAspect; startGroup] *) B=Table[(%[[1]]-(%[[1]]/.{C[i]->0}))/.{C[i]->1},{i,6}] (* :[font = output; output; inactive; preserveAspect; endGroup] {-(Sin[3*x]/E^(2*x)), Cos[3*x]/E^(2*x), -((x*Sin[3*x])/E^(2*x)), (x*Cos[3*x])/E^(2*x), -((x^2*Sin[3*x])/E^(2*x)), (x^2*Cos[3*x])/E^(2*x)} ;[o] Sin[3 x] Cos[3 x] x Sin[3 x] x Cos[3 x] {-(--------), --------, -(----------), ----------, 2 x 2 x 2 x 2 x E E E E 2 2 x Sin[3 x] x Cos[3 x] -(-----------), -----------} 2 x 2 x E E :[font = input; initialization; preserveAspect; startGroup] *) M=Table[D[B[[j]],{x,i-1}],{i,3},{j,3}]; M//TableForm (* :[font = output; output; inactive; preserveAspect; endGroup] TableForm[{{-(Sin[3*x]/E^(2*x)), Cos[3*x]/E^(2*x), -((x*Sin[3*x])/E^(2*x))}, {(-3*Cos[3*x])/E^(2*x) + (2*Sin[3*x])/E^(2*x), (-2*Cos[3*x])/E^(2*x) - (3*Sin[3*x])/E^(2*x), (-3*x*Cos[3*x])/E^(2*x) - Sin[3*x]/E^(2*x) + (2*x*Sin[3*x])/E^(2*x)}, {(12*Cos[3*x])/E^(2*x) + (5*Sin[3*x])/E^(2*x), (-5*Cos[3*x])/E^(2*x) + (12*Sin[3*x])/E^(2*x), (-6*Cos[3*x])/E^(2*x) + (12*x*Cos[3*x])/E^(2*x) + (4*Sin[3*x])/E^(2*x) + (5*x*Sin[3*x])/E^(2*x)}}] ;[o] Sin[3 x] Cos[3 x] -(--------) -------- 2 x 2 x E E x Sin[3 x] -(----------) 2 x E -3 Cos[3 x] 2 Sin[3 x] -2 Cos[3 x] 3 Sin[3 x] ----------- + ---------- ----------- - ---------- 2 x 2 x 2 x 2 x E E E E -3 x Cos[3 x] Sin[3 x] 2 x Sin[3 x] ------------- - -------- + ------------ 2 x 2 x 2 x E E E 12 Cos[3 x] 5 Sin[3 x] -5 Cos[3 x] 12 Sin[3 x] ----------- + ---------- ----------- + ----------- 2 x 2 x 2 x 2 x E E E E -6 Cos[3 x] 12 x Cos[3 x] 4 Sin[3 x] 5 x Sin[3 x] ----------- + ------------- + ---------- + ------------ 2 x 2 x 2 x 2 x E E E E :[font = input; initialization; preserveAspect; startGroup] *) W[0]=Det[M]/.{x->0} (* :[font = output; output; inactive; preserveAspect; endGroup] -18 ;[o] -18 :[font = input; initialization; preserveAspect] *) d) They are the same set of six linearly independent solutions. (* :[font = input; initialization; preserveAspect] *) Exercise 5 (* :[font = input; initialization; preserveAspect; startGroup] *) Clear[f,L] L[f_]:=D[f,{x,3}]-6D[f,{x,2}]+11D[f,x]-6f L[f[x]] (* :[font = output; output; inactive; preserveAspect; endGroup] -6*f[x] + 11*Derivative[1][f][x] - 6*Derivative[2][f][x] + Derivative[3][f][x] ;[o] (3) -6 f[x] + 11 f'[x] - 6 f''[x] + f [x] :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect; startGroup] *) f[x]/.DSolve[L[f[x]]==0,f[x],x] (* :[font = output; output; inactive; preserveAspect; endGroup] {E^x*C[1] + E^(2*x)*C[2] + E^(3*x)*C[3]} ;[o] x 2 x 3 x {E C[1] + E C[2] + E C[3]} :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) B=Table[(%[[1]]-(%[[1]]/.{C[i]->0}))/.{C[i]->1},{i,3}] (* :[font = output; output; inactive; preserveAspect; endGroup] {E^x, E^(2*x), E^(3*x)} ;[o] x 2 x 3 x {E , E , E } :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) f[x]/.DSolve[L[f[x]]==E^(3x),f[x],x] (* :[font = output; output; inactive; preserveAspect; endGroup] {(E^(3*x)*x)/2 + E^x*C[1] + E^(2*x)*C[2] + E^(3*x)*C[3]} ;[o] 3 x E x x 2 x 3 x {------ + E C[1] + E C[2] + E C[3]} 2 :[font = input; initialization; preserveAspect] *) Exercise 6 (* :[font = input; initialization; preserveAspect; startGroup] *) p=x^5+x^4+x^3+x^2+x+1 (* :[font = output; output; inactive; preserveAspect; endGroup] 1 + x + x^2 + x^3 + x^4 + x^5 ;[o] 2 3 4 5 1 + x + x + x + x + x :[font = input; initialization; preserveAspect; startGroup] *) Clear[L,f] L[f_]:=Sum[Coefficient[p,x^i]D[f,{x,i}],{i,0,5}] L[f[x]] (* :[font = output; output; inactive; preserveAspect; endGroup] f[x] + Derivative[1][f][x] + Derivative[2][f][x] + Derivative[3][f][x] + Derivative[4][f][x] + Derivative[5][f][x] ;[o] (3) (4) (5) f[x] + f'[x] + f''[x] + f [x] + f [x] + f [x] :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect; startGroup] *) p//Factor (* :[font = output; output; inactive; preserveAspect; endGroup] (1 + x)*(1 - x + x^2)*(1 + x + x^2) ;[o] 2 2 (1 + x) (1 - x + x ) (1 + x + x ) :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) f[x]/.DSolve[L[f[x]]==0,f[x],x] (* :[font = message; inactive; preserveAspect] DSolve::dsdeg: Warning: Differential equation of order higher than four encountered. DSolve may not be able to find the solution. :[font = output; output; inactive; preserveAspect; endGroup] {C[1]/E^x + E^(((-1 - I*3^(1/2))*x)/2)*C[2] + E^(((1 - I*3^(1/2))*x)/2)*C[3] + E^(((-1 + I*3^(1/2))*x)/2)*C[4] + E^(((1 + I*3^(1/2))*x)/2)*C[5]} ;[o] C[1] ((-1 - I Sqrt[3]) x)/2 {---- + E C[2] + x E ((1 - I Sqrt[3]) x)/2 E C[3] + ((-1 + I Sqrt[3]) x)/2 ((1 + I Sqrt[3]) x)/2 E C[4] + E C[5] } :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) f[x]/.DSolve[{L[f[x]]==0,{f'[0],f''[0],f'''[0],f''''[0]}=={0,0,0,0}},f[x],x] (* :[font = message; inactive; preserveAspect] DSolve::dsdeg: Warning: Differential equation of order higher than four encountered. DSolve may not be able to find the solution. :[font = message; inactive; preserveAspect] Solve::svars: Warning: Equations may not give solutions for all "solve" variables. :[font = output; output; inactive; preserveAspect; endGroup] {(4*I*C[5])/((I + 3^(1/2))*E^x) + I*3^(1/2)*E^(((-1 - I*3^(1/2))*x)/2)*C[5] + ((I - 3^(1/2))*E^(((1 - I*3^(1/2))*x)/2)*C[5])/ (I + 3^(1/2)) + ((3*I + 3^(1/2))* E^(((-1 + I*3^(1/2))*x)/2)*C[5])/(I + 3^(1/2)) + E^(((1 + I*3^(1/2))*x)/2)*C[5]} ;[o] 4 I C[5] ((-1 - I Sqrt[3]) x)/2 {---------------- + I Sqrt[3] E C[5] + x (I + Sqrt[3]) E ((1 - I Sqrt[3]) x)/2 (I - Sqrt[3]) E C[5] ----------------------------------------- + I + Sqrt[3] ((-1 + I Sqrt[3]) x)/2 (3 I + Sqrt[3]) E C[5] -------------------------------------------- + I + Sqrt[3] ((1 + I Sqrt[3]) x)/2 E C[5]} :[font = input; initialization; preserveAspect] *) d) (* :[font = input; initialization; preserveAspect; startGroup] *) DSolve[{L[f[x]]==0,{f[0],f'[0],f''[0],f'''[0],f''''[0]} \ =={0,0,0,0,0}},f[x],x] (* :[font = message; inactive; preserveAspect] DSolve::dsdeg: Warning: Differential equation of order higher than four encountered. DSolve may not be able to find the solution. :[font = output; output; inactive; preserveAspect; endGroup] {{f[x] -> 0}} ;[o] {{f[x] -> 0}} :[font = input; initialization; preserveAspect] *) Check: (* :[font = input; initialization; preserveAspect; startGroup] *) f[x]=%%/.Solve[(%%/.{x->0})==0,C[5]] (* :[font = output; output; inactive; preserveAspect; endGroup] {{0}} ;[o] {{0}} :[font = input; initialization; preserveAspect] *) Exercise 7 (* :[font = input; initialization; preserveAspect; startGroup] *) Clear[f,F,L] F[f_]:=D[f,{x,3}]+D[f,{x,2}]+f L[f_]:=F[F[f]] L[f[x]] (* :[font = output; output; inactive; preserveAspect; endGroup] f[x] + 2*Derivative[2][f][x] + 2*Derivative[3][f][x] + Derivative[4][f][x] + 2*Derivative[5][f][x] + Derivative[6][f][x] ;[o] (3) (4) (5) (6) f[x] + 2 f''[x] + 2 f [x] + f [x] + 2 f [x] + f [x] :[font = input; initialization; preserveAspect; startGroup] *) p=Sum[Coefficient[L[f[x]],D[f[x],{x,i}]]x^i,{i,0,6}] (* :[font = output; output; inactive; preserveAspect; endGroup] 1 + 2*x^2 + 2*x^3 + x^4 + 2*x^5 + x^6 ;[o] 2 3 4 5 6 1 + 2 x + 2 x + x + 2 x + x :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect; startGroup] *) p//Factor (* :[font = output; output; inactive; preserveAspect; endGroup] (1 + x^2 + x^3)^2 ;[o] 2 3 2 (1 + x + x ) :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) s=x/.Solve[p==0,x]; sR=Re[s] (* :[font = output; output; inactive; preserveAspect; endGroup] {-1/3 + 1/(3*2^(2/3)*(29 - 3*93^(1/2))^(1/3)) + (29 - 3*93^(1/2))^(1/3)/(6*2^(1/3)), -1/3 + 1/(3*2^(2/3)*(29 - 3*93^(1/2))^(1/3)) + (29 - 3*93^(1/2))^(1/3)/(6*2^(1/3)), -1/3 - 2^(1/3)/(3*(29 - 3*93^(1/2))^(1/3)) - (29 - 3*93^(1/2))^(1/3)/(3*2^(1/3)), -1/3 - 2^(1/3)/(3*(29 - 3*93^(1/2))^(1/3)) - (29 - 3*93^(1/2))^(1/3)/(3*2^(1/3)), -1/3 + 1/(3*2^(2/3)*(29 - 3*93^(1/2))^(1/3)) + (29 - 3*93^(1/2))^(1/3)/(6*2^(1/3)), -1/3 + 1/(3*2^(2/3)*(29 - 3*93^(1/2))^(1/3)) + (29 - 3*93^(1/2))^(1/3)/(6*2^(1/3))} ;[o] 1/3 1 1 (29 - 3 Sqrt[93]) {-(-) + --------------------------- + --------------------, 3 2/3 1/3 1/3 3 2 (29 - 3 Sqrt[93]) 6 2 1/3 1 1 (29 - 3 Sqrt[93]) -(-) + --------------------------- + --------------------, 3 2/3 1/3 1/3 3 2 (29 - 3 Sqrt[93]) 6 2 1/3 1/3 1 2 (29 - 3 Sqrt[93]) -(-) - ---------------------- - --------------------, 3 1/3 1/3 3 (29 - 3 Sqrt[93]) 3 2 1/3 1/3 1 2 (29 - 3 Sqrt[93]) -(-) - ---------------------- - --------------------, 3 1/3 1/3 3 (29 - 3 Sqrt[93]) 3 2 1/3 1 1 (29 - 3 Sqrt[93]) -(-) + --------------------------- + --------------------, 3 2/3 1/3 1/3 3 2 (29 - 3 Sqrt[93]) 6 2 1/3 1 1 (29 - 3 Sqrt[93]) -(-) + --------------------------- + --------------------} 3 2/3 1/3 1/3 3 2 (29 - 3 Sqrt[93]) 6 2 :[font = input; initialization; preserveAspect; startGroup] *) sI=Im[s] (* :[font = output; output; inactive; preserveAspect; endGroup] {-(1/(2^(2/3)*3^(1/2)*(29 - 3*93^(1/2))^(1/3))) + (29 - 3*93^(1/2))^(1/3)/(2*2^(1/3)*3^(1/2)), -(1/(2^(2/3)*3^(1/2)*(29 - 3*93^(1/2))^(1/3))) + (29 - 3*93^(1/2))^(1/3)/(2*2^(1/3)*3^(1/2)), 0, 0, 1/(2^(2/3)*3^(1/2)*(29 - 3*93^(1/2))^(1/3)) - (29 - 3*93^(1/2))^(1/3)/(2*2^(1/3)*3^(1/2)), 1/(2^(2/3)*3^(1/2)*(29 - 3*93^(1/2))^(1/3)) - (29 - 3*93^(1/2))^(1/3)/(2*2^(1/3)*3^(1/2))} ;[o] 1 {-(---------------------------------) + 2/3 1/3 2 Sqrt[3] (29 - 3 Sqrt[93]) 1/3 (29 - 3 Sqrt[93]) --------------------, 1/3 2 2 Sqrt[3] 1 -(---------------------------------) + 2/3 1/3 2 Sqrt[3] (29 - 3 Sqrt[93]) 1/3 (29 - 3 Sqrt[93]) --------------------, 0, 0, 1/3 2 2 Sqrt[3] 1/3 1 (29 - 3 Sqrt[93]) --------------------------------- - --------------------, 2/3 1/3 1/3 2 Sqrt[3] (29 - 3 Sqrt[93]) 2 2 Sqrt[3] 1/3 1 (29 - 3 Sqrt[93]) --------------------------------- - --------------------} 2/3 1/3 1/3 2 Sqrt[3] (29 - 3 Sqrt[93]) 2 2 Sqrt[3] :[font = input; initialization; preserveAspect] *) We will have to use floating point representations here, otherwise the result gets too complicated for Mathematica. (* :[font = input; initialization; preserveAspect; startGroup] *) j=Mod[2i,6]+1; f=Sum[If[i<4,C[i]E^(sR[[j]]x)(Cos[sI[[j]]x]+I Sin[sI[[j]]x]), \ x C[i]E^(sR[[j]]x)(Cos[sI[[j]]x]+I Sin[sI[[j]]x])],{i,6}]; f//N (* :[font = output; output; inactive; preserveAspect; endGroup] C[1]/2.718281828459045235^(1.46557123187676803*x) + (x*C[4])/2.718281828459045235^(1.46557123187676803*x) + 2.718281828459045235^(0.2327856159383840151*x)*C[3]* (Cos[0.7925519925154478522*x] - 1.*I*Sin[0.7925519925154478522*x]) + 2.718281828459045235^(0.2327856159383840151*x)*x*C[6]* (Cos[0.7925519925154478522*x] - 1.*I*Sin[0.7925519925154478522*x]) + 2.718281828459045235^(0.2327856159383840151*x)*C[2]* (Cos[0.7925519925154478522*x] + 1.*I*Sin[0.7925519925154478522*x]) + 2.718281828459045235^(0.2327856159383840151*x)*x*C[5]* (Cos[0.7925519925154478522*x] + 1.*I*Sin[0.7925519925154478522*x]) ;[o] C[1] x C[4] ---------------- + ---------------- + 1.46557 x 1.46557 x 2.71828 2.71828 0.232786 x 2.71828 C[3] (Cos[0.792552 x] - 1. I Sin[0.792552 x]) + 0.232786 x 2.71828 x C[6] (Cos[0.792552 x] - 1. I Sin[0.792552 x]) + 0.232786 x 2.71828 C[2] (Cos[0.792552 x] + 1. I Sin[0.792552 x]) + 0.232786 x 2.71828 x C[5] (Cos[0.792552 x] + 1. I Sin[0.792552 x]) :[font = input; initialization; preserveAspect] *) Solution check (gives a floating point approximation close enough to 0): (* :[font = input; initialization; preserveAspect; startGroup] *) L[f//N]/.{x->5}//Simplify (* :[font = output; output; inactive; preserveAspect; endGroup] 1.146676760991513661*10^-37*C[1] + (-(1.301042606982605321*10^-18) - 8.673617379884035472*10^-19*I)*C[2] + (-(1.301042606982605321*10^-18) + 8.673617379884035472*10^-19*I)*C[3] - 6.182761645643729848*10^-20*C[4] + (-(2.289834988289385365*10^-16) + 7.112366251504909087*10^-17*I)*C[5] + (-(2.289834988289385365*10^-16) - 7.112366251504909087*10^-17*I)*C[6] ;[o] -37 -18 -19 1.14668 10 C[1] + (-1.30104 10 - 8.67362 10 I) -18 -19 C[2] + (-1.30104 10 + 8.67362 10 I) C[3] - -20 -16 -17 6.18276 10 C[4] + (-2.28983 10 + 7.11237 10 I) -16 -17 C[5] + (-2.28983 10 - 7.11237 10 I) C[6] :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) x/.Solve[p==1,x] (* :[font = output; output; inactive; preserveAspect; endGroup] {-1, 0, 0, -1/3 + 2^(1/3)/(3*(-56 + 6*87^(1/2))^(1/3)) + (-56 + 6*87^(1/2))^(1/3)/(3*2^(1/3)), -1/3 - (1 + I*3^(1/2))/ (3*2^(2/3)*(-56 + 6*87^(1/2))^(1/3)) - ((1 - I*3^(1/2))*(-56 + 6*87^(1/2))^(1/3))/(6*2^(1/3)), -1/3 - (1 - I*3^(1/2))/ (3*2^(2/3)*(-56 + 6*87^(1/2))^(1/3)) - ((1 + I*3^(1/2))*(-56 + 6*87^(1/2))^(1/3))/(6*2^(1/3))} ;[o] 1/3 1 2 {-1, 0, 0, -(-) + ----------------------- + 3 1/3 3 (-56 + 6 Sqrt[87]) 1/3 (-56 + 6 Sqrt[87]) ---------------------, 1/3 3 2 1 1 + I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-56 + 6 Sqrt[87]) 1/3 (1 - I Sqrt[3]) (-56 + 6 Sqrt[87]) -------------------------------------, 1/3 6 2 1 1 - I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-56 + 6 Sqrt[87]) 1/3 (1 + I Sqrt[3]) (-56 + 6 Sqrt[87]) -------------------------------------} 1/3 6 2 :[font = input; initialization; preserveAspect] *) We notice from above that f=E^(-x)is a particular solution for the nonhomogeneous equation. (* :[font = input; initialization; preserveAspect; startGroup] *) f=f+E^(-x); f//N (* :[font = output; output; inactive; preserveAspect; endGroup] 2.718281828459045235^(-1.*x) + C[1]/2.718281828459045235^(1.46557123187676803*x) + (x*C[4])/2.718281828459045235^(1.46557123187676803*x) + 2.718281828459045235^(0.2327856159383840151*x)*C[3]* (Cos[0.7925519925154478522*x] - 1.*I*Sin[0.7925519925154478522*x]) + 2.718281828459045235^(0.2327856159383840151*x)*x*C[6]* (Cos[0.7925519925154478522*x] - 1.*I*Sin[0.7925519925154478522*x]) + 2.718281828459045235^(0.2327856159383840151*x)*C[2]* (Cos[0.7925519925154478522*x] + 1.*I*Sin[0.7925519925154478522*x]) + 2.718281828459045235^(0.2327856159383840151*x)*x*C[5]* (Cos[0.7925519925154478522*x] + 1.*I*Sin[0.7925519925154478522*x]) ;[o] -1. x C[1] x C[4] 2.71828 + ---------------- + ---------------- + 1.46557 x 1.46557 x 2.71828 2.71828 0.232786 x 2.71828 C[3] (Cos[0.792552 x] - 1. I Sin[0.792552 x]) + 0.232786 x 2.71828 x C[6] (Cos[0.792552 x] - 1. I Sin[0.792552 x]) + 0.232786 x 2.71828 C[2] (Cos[0.792552 x] + 1. I Sin[0.792552 x]) + 0.232786 x 2.71828 x C[5] (Cos[0.792552 x] + 1. I Sin[0.792552 x]) :[font = input; initialization; preserveAspect; startGroup] *) Solve[Table[D[f//N,{x,i-1}]/.{x->0},{i,6}]=={0,0,1,0,0,0}, \ {C[1],C[2],C[3],C[4],C[5],C[6]}] (* :[font = output; output; inactive; preserveAspect; endGroup] {{C[4] -> -0.03773461807958688222 + 8.470329472543003391*10^-21*I, C[5] -> -0.1585520457989162356 + 0.04937196153158245367*I, C[6] -> -0.1585520457989162356 - 0.04937196153158245371*I, C[1] -> -0.3187290896402679518 + 2.032879073410320814*10^-20*I, C[2] -> -0.3406354551798660241 - 0.660088299258783936*I, C[3] -> -0.3406354551798660241 + 0.6600882992587839361*I}} ;[o] -21 {{C[4] -> -0.0377346 + 8.47033 10 I, C[5] -> -0.158552 + 0.049372 I, C[6] -> -0.158552 - 0.049372 I, -20 C[1] -> -0.318729 + 2.03288 10 I, C[2] -> -0.340635 - 0.660088 I, C[3] -> -0.340635 + 0.660088 I}} :[font = input; initialization; preserveAspect; startGroup] *) (f//N)/.% (* :[font = output; output; inactive; preserveAspect; endGroup] {(-0.3187290896402679518 + 2.032879073410320814*10^-20*I)/ 2.718281828459045235^(1.46557123187676803*x) + 2.718281828459045235^(-1.*x) + ((-0.03773461807958688222 + 8.470329472543003391*10^-21*I)*x)/ 2.718281828459045235^(1.46557123187676803*x) + (-0.3406354551798660241 + 0.6600882992587839361*I)* 2.718281828459045235^(0.2327856159383840151*x)* (Cos[0.7925519925154478522*x] - 1.*I*Sin[0.7925519925154478522*x]) + (-0.1585520457989162356 - 0.04937196153158245371*I)* 2.718281828459045235^(0.2327856159383840151*x)*x* (Cos[0.7925519925154478522*x] - 1.*I*Sin[0.7925519925154478522*x]) + (-0.3406354551798660241 - 0.660088299258783936*I)* 2.718281828459045235^(0.2327856159383840151*x)* (Cos[0.7925519925154478522*x] + 1.*I*Sin[0.7925519925154478522*x]) + (-0.1585520457989162356 + 0.04937196153158245367*I)* 2.718281828459045235^(0.2327856159383840151*x)*x* (Cos[0.7925519925154478522*x] + 1.*I*Sin[0.7925519925154478522*x])} ;[o] -20 -0.318729 + 2.03288 10 I -1. x {--------------------------- + 2.71828 + 1.46557 x 2.71828 -21 (-0.0377346 + 8.47033 10 I) x -------------------------------- + 1.46557 x 2.71828 0.232786 x (-0.340635 + 0.660088 I) 2.71828 (Cos[0.792552 x] - 1. I Sin[0.792552 x]) + 0.232786 x (-0.158552 - 0.049372 I) 2.71828 x (Cos[0.792552 x] - 1. I Sin[0.792552 x]) + 0.232786 x (-0.340635 - 0.660088 I) 2.71828 (Cos[0.792552 x] + 1. I Sin[0.792552 x]) + 0.232786 x (-0.158552 + 0.049372 I) 2.71828 x (Cos[0.792552 x] + 1. I Sin[0.792552 x])} :[font = input; initialization; preserveAspect] *) Problems on Differential Operators (* :[font = input; initialization; preserveAspect] *) Problem 1 (* :[font = input; initialization; preserveAspect; startGroup] *) DSolve[{17/32s''[t]-(3-5)s[t]==0,s[0]==-12,s'[0]==0},s[t],t] (* :[font = output; output; inactive; preserveAspect; endGroup] {{{-1/3 + 2^(1/3)/(3*(-29 + 3*93^(1/2))^(1/3)) + (-29 + 3*93^(1/2))^(1/3)/(3*2^(1/3)), -1/3 + 2^(1/3)/(3*(-29 + 3*93^(1/2))^(1/3)) + (-29 + 3*93^(1/2))^(1/3)/(3*2^(1/3)), -1/3 - (1 + I*3^(1/2))/ (3*2^(2/3)*(-29 + 3*93^(1/2))^(1/3)) - ((1 - I*3^(1/2))*(-29 + 3*93^(1/2))^(1/3))/(6*2^(1/3)) , -1/3 - (1 + I*3^(1/2))/ (3*2^(2/3)*(-29 + 3*93^(1/2))^(1/3)) - ((1 - I*3^(1/2))*(-29 + 3*93^(1/2))^(1/3))/(6*2^(1/3)) , -1/3 - (1 - I*3^(1/2))/ (3*2^(2/3)*(-29 + 3*93^(1/2))^(1/3)) - ((1 + I*3^(1/2))*(-29 + 3*93^(1/2))^(1/3))/(6*2^(1/3)) , -1/3 - (1 - I*3^(1/2))/ (3*2^(2/3)*(-29 + 3*93^(1/2))^(1/3)) - ((1 + I*3^(1/2))*(-29 + 3*93^(1/2))^(1/3))/(6*2^(1/3)) }[t] -> -6*E^((-8*I*t)/17^(1/2)) - 6*E^((8*I*t)/17^(1/2))}} ;[o] 1/3 1/3 1 2 (-29 + 3 Sqrt[93]) {{{-(-) + ----------------------- + ---------------------, 3 1/3 1/3 3 (-29 + 3 Sqrt[93]) 3 2 1/3 1 2 -(-) + ----------------------- + 3 1/3 3 (-29 + 3 Sqrt[93]) 1/3 (-29 + 3 Sqrt[93]) ---------------------, 1/3 3 2 1 1 + I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-29 + 3 Sqrt[93]) 1/3 (1 - I Sqrt[3]) (-29 + 3 Sqrt[93]) -------------------------------------, 1/3 6 2 1 1 + I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-29 + 3 Sqrt[93]) 1/3 (1 - I Sqrt[3]) (-29 + 3 Sqrt[93]) -------------------------------------, 1/3 6 2 1 1 - I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-29 + 3 Sqrt[93]) 1/3 (1 + I Sqrt[3]) (-29 + 3 Sqrt[93]) -------------------------------------, 1/3 6 2 1 1 - I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-29 + 3 Sqrt[93]) 1/3 (1 + I Sqrt[3]) (-29 + 3 Sqrt[93]) -------------------------------------}[t] -> 1/3 6 2 (-8 I t)/Sqrt[17] (8 I t)/Sqrt[17] -6 E - 6 E }} :[font = input; initialization; preserveAspect; startGroup] *) Plot[-12Cos[8t/Sqrt[17]],{t,0,6}] (* :[font = postscript; PostScript; formatAsPostScript; output; inactive; preserveAspect; pictureLeft = 34; pictureWidth = 282; pictureHeight = 174] %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.15873 0.309018 0.0245252 [ [(1)] .18254 .30902 0 2 Msboxa [(2)] .34127 .30902 0 2 Msboxa [(3)] .5 .30902 0 2 Msboxa [(4)] .65873 .30902 0 2 Msboxa [(5)] .81746 .30902 0 2 Msboxa [(6)] .97619 .30902 0 2 Msboxa [(-10)] .01131 .06377 1 0 Msboxa [(-5)] .01131 .18639 1 0 Msboxa [(5)] .01131 .43164 1 0 Msboxa [(10)] .01131 .55427 1 0 Msboxa [ -0.001 -0.001 0 0 ] [ 1.001 .61903 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath [ ] 0 setdash 0 g p p .002 w .18254 .30902 m .18254 .31527 L s P [(1)] .18254 .30902 0 2 Mshowa p .002 w .34127 .30902 m .34127 .31527 L s P [(2)] .34127 .30902 0 2 Mshowa p .002 w .5 .30902 m .5 .31527 L s P [(3)] .5 .30902 0 2 Mshowa p .002 w .65873 .30902 m .65873 .31527 L s P [(4)] .65873 .30902 0 2 Mshowa p .002 w .81746 .30902 m .81746 .31527 L s P [(5)] .81746 .30902 0 2 Mshowa p .002 w .97619 .30902 m .97619 .31527 L s P [(6)] .97619 .30902 0 2 Mshowa p .001 w .05556 .30902 m .05556 .31277 L s P p .001 w .0873 .30902 m .0873 .31277 L s P p .001 w .11905 .30902 m .11905 .31277 L s P p .001 w .15079 .30902 m .15079 .31277 L s P p .001 w .21429 .30902 m .21429 .31277 L s P p .001 w .24603 .30902 m .24603 .31277 L s P p .001 w .27778 .30902 m .27778 .31277 L s P p .001 w .30952 .30902 m .30952 .31277 L s P p .001 w .37302 .30902 m .37302 .31277 L s P p .001 w .40476 .30902 m .40476 .31277 L s P p .001 w .43651 .30902 m .43651 .31277 L s P p .001 w .46825 .30902 m .46825 .31277 L s P p .001 w .53175 .30902 m .53175 .31277 L s P p .001 w .56349 .30902 m .56349 .31277 L s P p .001 w .59524 .30902 m .59524 .31277 L s P p .001 w .62698 .30902 m .62698 .31277 L s P p .001 w .69048 .30902 m .69048 .31277 L s P p .001 w .72222 .30902 m .72222 .31277 L s P p .001 w .75397 .30902 m .75397 .31277 L s P p .001 w .78571 .30902 m .78571 .31277 L s P p .001 w .84921 .30902 m .84921 .31277 L s P p .001 w .88095 .30902 m .88095 .31277 L s P p .001 w .9127 .30902 m .9127 .31277 L s P p .001 w .94444 .30902 m .94444 .31277 L s P p .002 w 0 .30902 m 1 .30902 L s P p .002 w .02381 .06377 m .03006 .06377 L s P [(-10)] .01131 .06377 1 0 Mshowa p .002 w .02381 .18639 m .03006 .18639 L s P [(-5)] .01131 .18639 1 0 Mshowa p .002 w .02381 .43164 m .03006 .43164 L s P [(5)] .01131 .43164 1 0 Mshowa p .002 w .02381 .55427 m .03006 .55427 L s P [(10)] .01131 .55427 1 0 Mshowa p .001 w .02381 .08829 m .02756 .08829 L s P p .001 w .02381 .11282 m .02756 .11282 L s P p .001 w .02381 .13734 m .02756 .13734 L s P p .001 w .02381 .16187 m .02756 .16187 L s P p .001 w .02381 .21092 m .02756 .21092 L s P p .001 w .02381 .23544 m .02756 .23544 L s P p .001 w .02381 .25997 m .02756 .25997 L s P p .001 w .02381 .28449 m .02756 .28449 L s P p .001 w .02381 .33354 m .02756 .33354 L s P p .001 w .02381 .35807 m .02756 .35807 L s P p .001 w .02381 .38259 m .02756 .38259 L s P p .001 w .02381 .40712 m .02756 .40712 L s P p .001 w .02381 .45617 m .02756 .45617 L s P p .001 w .02381 .48069 m .02756 .48069 L s P p .001 w .02381 .50522 m .02756 .50522 L s P p .001 w .02381 .52975 m .02756 .52975 L s P p .001 w .02381 .03924 m .02756 .03924 L s P p .001 w .02381 .01472 m .02756 .01472 L s P p .001 w .02381 .5788 m .02756 .5788 L s P p .001 w .02381 .60332 m .02756 .60332 L s P p .002 w .02381 0 m .02381 .61803 L s P P 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath p p .004 w .02381 .01472 m .02505 .01475 L .02629 .01485 L .02753 .01502 L .02877 .01526 L .03125 .01593 L .03373 .01688 L .03621 .01809 L .03869 .01957 L .04365 .02333 L .05357 .03398 L .06349 .04867 L .08333 .08924 L .10317 .14268 L .14286 .27508 L .18254 .4153 L .20238 .4781 L .22222 .53101 L .23214 .55275 L .24206 .57091 L .25198 .58523 L .25694 .59088 L .2619 .59549 L .26438 .5974 L .26687 .59905 L .26935 .60043 L .27183 .60155 L .27307 .602 L .27431 .60239 L .27555 .60271 L .27679 .60296 L .27803 .60315 L .27927 .60327 L .28051 .60332 L .28175 .6033 L .28299 .60322 L .28423 .60307 L .28547 .60285 L .28671 .60256 L .28919 .60178 L .29167 .60074 L .29663 .59784 L .30159 .59389 L .31151 .58285 L .32143 .56779 L .34127 .52655 L .36111 .47258 L .38095 .40903 L .42063 .26844 L .44048 .19962 L Mistroke .46032 .13721 L .48016 .08485 L .49008 .06343 L .5 .04561 L .50992 .03167 L .51488 .02621 L .51984 .0218 L .52232 .01998 L .5248 .01843 L .52728 .01715 L .52976 .01614 L .531 .01574 L .53224 .0154 L .53348 .01513 L .53472 .01493 L .53596 .01479 L .5372 .01472 L .53844 .01472 L .53968 .01479 L .54092 .01493 L .54216 .01513 L .5434 .0154 L .54464 .01574 L .54712 .01662 L .5496 .01776 L .55456 .02086 L .55952 .02501 L .56944 .03643 L .57937 .05185 L .59921 .09375 L .61905 .14825 L .65873 .28173 L .69841 .42152 L .71825 .48354 L .7381 .53534 L .74802 .55644 L .75794 .5739 L .7629 .58119 L .76786 .58747 L .77282 .59273 L .77778 .59695 L .78026 .59867 L .78274 .60011 L .78522 .60129 L .7877 .6022 L .78894 .60256 L .79018 .60285 L .79142 .60307 L .79266 .60322 L .7939 .6033 L Mistroke .79514 .60332 L .79638 .60327 L .79762 .60315 L .79886 .60296 L .8001 .60271 L .80258 .602 L .80506 .60102 L .80754 .59978 L .8125 .59648 L .81746 .59213 L .82738 .58033 L .8373 .56454 L .85714 .52199 L .89683 .40271 L .93651 .26182 L .97619 .13182 L Mfstroke P P % End of Graphics MathPictureEnd :[font = output; output; inactive; preserveAspect; endGroup] Graphics["<<>>"] ;[o] -Graphics- :[font = input; initialization; preserveAspect] *) Problem 2 (* :[font = input; initialization; preserveAspect; startGroup] *) DSolve[{17/32s''[t]-(3-5)s[t]+s'[t]==0,s[0]==-12,s'[0]==0},s[t],t] (* :[font = output; output; inactive; preserveAspect; endGroup] {{{-1/3 + 2^(1/3)/(3*(-29 + 3*93^(1/2))^(1/3)) + (-29 + 3*93^(1/2))^(1/3)/(3*2^(1/3)), -1/3 + 2^(1/3)/(3*(-29 + 3*93^(1/2))^(1/3)) + (-29 + 3*93^(1/2))^(1/3)/(3*2^(1/3)), -1/3 - (1 + I*3^(1/2))/ (3*2^(2/3)*(-29 + 3*93^(1/2))^(1/3)) - ((1 - I*3^(1/2))*(-29 + 3*93^(1/2))^(1/3))/(6*2^(1/3)) , -1/3 - (1 + I*3^(1/2))/ (3*2^(2/3)*(-29 + 3*93^(1/2))^(1/3)) - ((1 - I*3^(1/2))*(-29 + 3*93^(1/2))^(1/3))/(6*2^(1/3)) , -1/3 - (1 - I*3^(1/2))/ (3*2^(2/3)*(-29 + 3*93^(1/2))^(1/3)) - ((1 + I*3^(1/2))*(-29 + 3*93^(1/2))^(1/3))/(6*2^(1/3)) , -1/3 - (1 - I*3^(1/2))/ (3*2^(2/3)*(-29 + 3*93^(1/2))^(1/3)) - ((1 + I*3^(1/2))*(-29 + 3*93^(1/2))^(1/3))/(6*2^(1/3)) }[t] -> (-6 - (12*I)/13^(1/2))* E^(((-32 - 16*I*13^(1/2))*t)/34) + (-6 + (12*I)/13^(1/2))*E^(((-32 + 16*I*13^(1/2))*t)/34)} } ;[o] 1/3 1/3 1 2 (-29 + 3 Sqrt[93]) {{{-(-) + ----------------------- + ---------------------, 3 1/3 1/3 3 (-29 + 3 Sqrt[93]) 3 2 1/3 1 2 -(-) + ----------------------- + 3 1/3 3 (-29 + 3 Sqrt[93]) 1/3 (-29 + 3 Sqrt[93]) ---------------------, 1/3 3 2 1 1 + I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-29 + 3 Sqrt[93]) 1/3 (1 - I Sqrt[3]) (-29 + 3 Sqrt[93]) -------------------------------------, 1/3 6 2 1 1 + I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-29 + 3 Sqrt[93]) 1/3 (1 - I Sqrt[3]) (-29 + 3 Sqrt[93]) -------------------------------------, 1/3 6 2 1 1 - I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-29 + 3 Sqrt[93]) 1/3 (1 + I Sqrt[3]) (-29 + 3 Sqrt[93]) -------------------------------------, 1/3 6 2 1 1 - I Sqrt[3] -(-) - ---------------------------- - 3 2/3 1/3 3 2 (-29 + 3 Sqrt[93]) 1/3 (1 + I Sqrt[3]) (-29 + 3 Sqrt[93]) -------------------------------------}[t] -> 1/3 6 2 12 I ((-32 - 16 I Sqrt[13]) t)/34 (-6 - --------) E + Sqrt[13] 12 I ((-32 + 16 I Sqrt[13]) t)/34 (-6 + --------) E }} Sqrt[13] :[font = input; initialization; preserveAspect; startGroup] *) Plot[E^(-16t/17)(-12Cos[8Sqrt[13]t/17]-24/Sqrt[13]Sin[8Sqrt[13]t/17]), \ {t,0,6}] (* :[font = postscript; PostScript; formatAsPostScript; output; inactive; preserveAspect; pictureLeft = 34; pictureWidth = 282; pictureHeight = 174] %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart %% Graphics /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.15873 0.399175 0.0971796 [ [(1)] .18254 .39917 0 2 Msboxa [(2)] .34127 .39917 0 2 Msboxa [(3)] .5 .39917 0 2 Msboxa [(4)] .65873 .39917 0 2 Msboxa [(5)] .81746 .39917 0 2 Msboxa [(6)] .97619 .39917 0 2 Msboxa [(-4)] .01131 .01046 1 0 Msboxa [(-3)] .01131 .10764 1 0 Msboxa [(-2)] .01131 .20482 1 0 Msboxa [(-1)] .01131 .302 1 0 Msboxa [(1)] .01131 .49635 1 0 Msboxa [(2)] .01131 .59353 1 0 Msboxa [ -0.001 -0.001 0 0 ] [ 1.001 .61903 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath [ ] 0 setdash 0 g p p .002 w .18254 .39917 m .18254 .40542 L s P [(1)] .18254 .39917 0 2 Mshowa p .002 w .34127 .39917 m .34127 .40542 L s P [(2)] .34127 .39917 0 2 Mshowa p .002 w .5 .39917 m .5 .40542 L s P [(3)] .5 .39917 0 2 Mshowa p .002 w .65873 .39917 m .65873 .40542 L s P [(4)] .65873 .39917 0 2 Mshowa p .002 w .81746 .39917 m .81746 .40542 L s P [(5)] .81746 .39917 0 2 Mshowa p .002 w .97619 .39917 m .97619 .40542 L s P [(6)] .97619 .39917 0 2 Mshowa p .001 w .05556 .39917 m .05556 .40292 L s P p .001 w .0873 .39917 m .0873 .40292 L s P p .001 w .11905 .39917 m .11905 .40292 L s P p .001 w .15079 .39917 m .15079 .40292 L s P p .001 w .21429 .39917 m .21429 .40292 L s P p .001 w .24603 .39917 m .24603 .40292 L s P p .001 w .27778 .39917 m .27778 .40292 L s P p .001 w .30952 .39917 m .30952 .40292 L s P p .001 w .37302 .39917 m .37302 .40292 L s P p .001 w .40476 .39917 m .40476 .40292 L s P p .001 w .43651 .39917 m .43651 .40292 L s P p .001 w .46825 .39917 m .46825 .40292 L s P p .001 w .53175 .39917 m .53175 .40292 L s P p .001 w .56349 .39917 m .56349 .40292 L s P p .001 w .59524 .39917 m .59524 .40292 L s P p .001 w .62698 .39917 m .62698 .40292 L s P p .001 w .69048 .39917 m .69048 .40292 L s P p .001 w .72222 .39917 m .72222 .40292 L s P p .001 w .75397 .39917 m .75397 .40292 L s P p .001 w .78571 .39917 m .78571 .40292 L s P p .001 w .84921 .39917 m .84921 .40292 L s P p .001 w .88095 .39917 m .88095 .40292 L s P p .001 w .9127 .39917 m .9127 .40292 L s P p .001 w .94444 .39917 m .94444 .40292 L s P p .002 w 0 .39917 m 1 .39917 L s P p .002 w .02381 .01046 m .03006 .01046 L s P [(-4)] .01131 .01046 1 0 Mshowa p .002 w .02381 .10764 m .03006 .10764 L s P [(-3)] .01131 .10764 1 0 Mshowa p .002 w .02381 .20482 m .03006 .20482 L s P [(-2)] .01131 .20482 1 0 Mshowa p .002 w .02381 .302 m .03006 .302 L s P [(-1)] .01131 .302 1 0 Mshowa p .002 w .02381 .49635 m .03006 .49635 L s P [(1)] .01131 .49635 1 0 Mshowa p .002 w .02381 .59353 m .03006 .59353 L s P [(2)] .01131 .59353 1 0 Mshowa p .001 w .02381 .02989 m .02756 .02989 L s P p .001 w .02381 .04933 m .02756 .04933 L s P p .001 w .02381 .06876 m .02756 .06876 L s P p .001 w .02381 .0882 m .02756 .0882 L s P p .001 w .02381 .12707 m .02756 .12707 L s P p .001 w .02381 .14651 m .02756 .14651 L s P p .001 w .02381 .16594 m .02756 .16594 L s P p .001 w .02381 .18538 m .02756 .18538 L s P p .001 w .02381 .22425 m .02756 .22425 L s P p .001 w .02381 .24369 m .02756 .24369 L s P p .001 w .02381 .26312 m .02756 .26312 L s P p .001 w .02381 .28256 m .02756 .28256 L s P p .001 w .02381 .32143 m .02756 .32143 L s P p .001 w .02381 .34087 m .02756 .34087 L s P p .001 w .02381 .3603 m .02756 .3603 L s P p .001 w .02381 .37974 m .02756 .37974 L s P p .001 w .02381 .41861 m .02756 .41861 L s P p .001 w .02381 .43805 m .02756 .43805 L s P p .001 w .02381 .45748 m .02756 .45748 L s P p .001 w .02381 .47692 m .02756 .47692 L s P p .001 w .02381 .51579 m .02756 .51579 L s P p .001 w .02381 .53523 m .02756 .53523 L s P p .001 w .02381 .55466 m .02756 .55466 L s P p .001 w .02381 .5741 m .02756 .5741 L s P p .001 w .02381 .61297 m .02756 .61297 L s P p .002 w .02381 0 m .02381 .61803 L s P P 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath p p .004 w s s s s s s s s s s s s s .15348 0 m .18254 .20593 L s .18254 .20593 m .20238 .32164 L .22222 .41713 L .24206 .49166 L .25198 .52119 L .2619 .54574 L .27183 .56554 L .28175 .58084 L .28671 .58689 L .29167 .59192 L .29663 .59598 L .30159 .5991 L .30407 .60033 L .30655 .60134 L .30903 .60213 L .31027 .60245 L .31151 .60272 L .31275 .60294 L .31399 .6031 L .31523 .60322 L .31647 .6033 L .31771 .60332 L .31895 .6033 L .32019 .60323 L .32143 .60311 L .32267 .60295 L .32391 .60275 L .32639 .60221 L .32887 .6015 L .33135 .60063 L .33631 .59843 L .34127 .59564 L .35119 .58848 L .36111 .57949 L .38095 .55732 L .42063 .50428 L .46032 .4518 L .48016 .42895 L .5 .40934 L .51984 .39331 L .53968 .38094 L .5496 .3761 L .55952 .37212 L .56944 .36896 L .5744 .36767 L .57937 .36656 L .58433 .36564 L .58929 .36488 L .59425 .3643 L .59673 .36406 L Mistroke .59921 .36387 L .60169 .36371 L .60417 .36359 L .60541 .36354 L .60665 .3635 L .60789 .36348 L .60913 .36345 L .61037 .36344 L .61161 .36344 L .61285 .36344 L .61409 .36345 L .61533 .36347 L .61657 .3635 L .61905 .36358 L .62153 .36369 L .62401 .36383 L .62897 .36419 L .63393 .36465 L .63889 .36521 L .65873 .36827 L .69841 .37689 L .7381 .38637 L .77778 .39465 L .79762 .39797 L .81746 .40066 L .82738 .40176 L .8373 .4027 L .84722 .40349 L .85714 .40413 L .86706 .40464 L .87202 .40484 L .87698 .40501 L .88194 .40515 L .8869 .40526 L .88938 .4053 L .89187 .40534 L .89435 .40537 L .89683 .40539 L .89807 .4054 L .89931 .40541 L .90055 .40542 L .90179 .40542 L .90303 .40543 L .90427 .40543 L .90551 .40543 L .90675 .40543 L .90799 .40543 L .90923 .40542 L .91047 .40542 L .91171 .40541 L Mistroke .91419 .4054 L .91667 .40538 L .92163 .40532 L .92659 .40524 L .93651 .40504 L .95635 .40446 L .97619 .40373 L Mfstroke P P % End of Graphics MathPictureEnd :[font = output; output; inactive; preserveAspect; endGroup] Graphics["<<>>"] ;[o] -Graphics- :[font = input; initialization; preserveAspect] *) Exercises on Recurrence Relations (* :[font = input; initialization; preserveAspect] *) <j-1},{i,5},{j,5}]//MatrixForm (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{{1}, {0}, {0}, {0}, {0}}, {{0}, {1}, {0}, {0}, {0}}, {{0}, {0}, {1}, {0}, {0}}, {{0}, {0}, {0}, {1}, {0}}, {{0}, {0}, {0}, {0}, {1}}}] ;[o] 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 :[font = input; initialization; preserveAspect] *) Exercise 2 a) (* :[font = input; initialization; preserveAspect; startGroup] *) s[n]/.RSolve[{s[n+1]-s[n]==(n+1)^2,s[0]==0},s[n],n]//Factor (* :[font = output; output; inactive; preserveAspect; endGroup] {(n*(1 + n)*(1 + 2*n))/6} ;[o] n (1 + n) (1 + 2 n) {-------------------} 6 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) s[n]/.RSolve[{s[n+1]-s[n]==(n+1)^3,s[0]==0},s[n],n]//Factor (* :[font = output; output; inactive; preserveAspect; endGroup] {(n^2*(1 + n)^2)/4} ;[o] 2 2 n (1 + n) {-----------} 4 :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) s[n]/.RSolve[{s[n+1]-s[n]==(n+1)^4,s[0]==0},s[n],n]//Factor (* :[font = output; output; inactive; preserveAspect; endGroup] {((-1 - n)*n*(1 + 2*n)*(1 - 3*n - 3*n^2))/30} ;[o] 2 (-1 - n) n (1 + 2 n) (1 - 3 n - 3 n ) {-------------------------------------} 30 :[font = input; initialization; preserveAspect] *) d) (* :[font = input; initialization; preserveAspect; startGroup] *) s[n]/.RSolve[{s[n+1]-s[n]==(n+1)^5,s[0]==0},s[n],n]//Factor (* :[font = output; output; inactive; preserveAspect; endGroup] {(n^2*(1 + n)^2*(-1 + 2*n + 2*n^2))/12} ;[o] 2 2 2 n (1 + n) (-1 + 2 n + 2 n ) {-----------------------------} 12 :[font = input; initialization; preserveAspect] *) Exercise 3 (* :[font = input; initialization; preserveAspect] *) We can conjecture that sums for even n's contain the factors n(1+n), whereis sums for odd n's contain (n^2)(1+n)^2. Verification: (* :[font = input; initialization; preserveAspect; startGroup] *) s[n]/.RSolve[{s[n+1]-s[n]==(n+1)^10,s[0]==0},s[n],n]//Factor (* :[font = output; output; inactive; preserveAspect; endGroup] {(n*(1 + n)*(1 + 2*n)*(-1 + n + n^2)* (-5 + 10*n + 3*n^2 - 11*n^3 + 2*n^4 + 9*n^5 + 3*n^6))/66 } ;[o] 2 {(n (1 + n) (1 + 2 n) (-1 + n + n ) 2 3 4 5 6 (-5 + 10 n + 3 n - 11 n + 2 n + 9 n + 3 n )) / 66} :[font = input; initialization; preserveAspect; startGroup] *) s[n]/.RSolve[{s[n+1]-s[n]==(n+1)^15,s[0]==0},s[n],n]//Factor (* :[font = output; output; inactive; preserveAspect; endGroup] {(n^2*(1 + n)^2*(420 - 840*n - 122*n^2 + 1084*n^3 - 226*n^4 - 632*n^5 + 203*n^6 + 226*n^7 - 83*n^8 - 60*n^9 + 21*n^10 + 18*n^11 + 3*n^12))/48} ;[o] 2 2 2 3 4 {(n (1 + n) (420 - 840 n - 122 n + 1084 n - 226 n - 5 6 7 8 9 10 632 n + 203 n + 226 n - 83 n - 60 n + 21 n + 11 12 18 n + 3 n )) / 48} :[font = input; initialization; preserveAspect] *) Exercise 4 (* :[font = input; initialization; preserveAspect] *) Clear[n,s,L,F,d] d[s_]:=s/.{n->n+1} F[s_]:=d[s]-2s L[s_]:=F[F[F[s]]] (* :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect; startGroup] *) L[2^n]//Expand (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect; startGroup] *) L[n 2^n]//Expand (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect; startGroup] *) L[n^2 2^n]//Expand (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) K=Table[{2^(n-1),(n-1)2^(n-1),(n-1)^2 2^(n-1)},{n,3}]; K//MatrixForm (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 0, 0}, {2, 2, 2}, {4, 8, 16}}] ;[o] 1 0 0 2 2 2 4 8 16 :[font = input; initialization; preserveAspect; startGroup] *) Det[K] (* :[font = output; output; inactive; preserveAspect; endGroup] 16 ;[o] 16 :[font = input; initialization; preserveAspect] *) We can now conclude that the solutions in part (a) are a basis for the kernel of L, taking also into account the fact that the kernel has dimension 3. (* :[font = input; initialization; preserveAspect] *) c) We conjecture that (n^i)(r^n) , with 0 <= i < f , will be solutions. (* :[font = input; initialization; preserveAspect] *) L[s_]:=F[F[F[F[s]]]] (* :[font = input; initialization; preserveAspect; startGroup] *) Do[Print[L[n^i 2^n]//Expand],{i,0,3}] (* :[font = print; inactive; preserveAspect; endGroup] 0 0 0 0 :[font = input; initialization; preserveAspect] *) Exercise 5 (* :[font = input; initialization; preserveAspect] *) F[s_]:=d[s]+2s L[s_]:=F[F[s]]+(3^2+2^2)s (* :[font = input; initialization; preserveAspect; startGroup] *) RSolve[L[s[n]]==0,s[n],n] (* :[font = output; output; inactive; preserveAspect; endGroup] {{s[n] -> (17/13)^(1/2)*17^(n/2)* Cos[n*Pi - n*ArcTan[13^(1/2)/2] + ArcTan[2*(9/(17*13^(1/2)) - (2*13^(1/2))/17)]]*s[0] \ + (17/13)^(1/2)*17^(-1/2 + n/2)* Cos[ArcTan[2/13^(1/2)] + (-1 + n)*(Pi - ArcTan[13^(1/2)/2])]*If[n >= 1, 1, 0]* s[1]}} ;[o] 17 n/2 {{s[n] -> Sqrt[--] 17 13 Sqrt[13] Cos[n Pi - n ArcTan[--------] + 2 9 2 Sqrt[13] ArcTan[2 (----------- - ----------)]] s[0] + 17 Sqrt[13] 17 17 -(1/2) + n/2 Sqrt[--] 17 13 2 Cos[ArcTan[--------] + Sqrt[13] Sqrt[13] (-1 + n) (Pi - ArcTan[--------])] If[n >= 1, 1, 0] 2 s[1]}} :[font = input; initialization; preserveAspect] *) Problems on Recurrence Relations (* :[font = input; initialization; preserveAspect] *) Problem 1 a) (* :[font = input; initialization; preserveAspect] *) One can imagine a recurrent scheme by which, in order to move i+1 disks once we need M[i+1]=2M[i]+1 moves, since we have to move the top n, then move the disk # n+1, then move back the top n. (* :[font = input; initialization; preserveAspect; startGroup] *) M[i]/.RSolve[{M[i+1]==2M[i]+1,M[0]==0},M[i],i] (* :[font = output; output; inactive; preserveAspect; endGroup] {-1 + 2^i} ;[o] i {-1 + 2 } :[font = input; initialization; preserveAspect] *) To achieve our goal, we'll need: (* :[font = input; initialization; preserveAspect; startGroup] *) S=Sum[1+%[[1]],{i,0,n-1}] (* :[font = output; output; inactive; preserveAspect; endGroup] Sum[2^i, {i, 0, -1 + n}] ;[o] i Sum[2 , {i, 0, -1 + n}] :[font = input; initialization; preserveAspect] *) i.e., (* :[font = input; initialization; preserveAspect; startGroup] *) S=-1+2^n (* :[font = output; output; inactive; preserveAspect; endGroup] -1 + 2^n ;[o] n -1 + 2 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) (S/.{n->64})/((365+1/4)*24*60*60) (* :[font = output; output; inactive; preserveAspect; endGroup] 1229782938247303441/2103840 ;[o] 1229782938247303441 ------------------- 2103840 :[font = input; initialization; preserveAspect; startGroup] *) %//N (* :[font = output; output; inactive; preserveAspect; endGroup] 5.845420460906263979*10^11 ;[o] 11 5.84542 10 :[font = input; initialization; preserveAspect] *) Problem 2 a) (* :[font = input; initialization; preserveAspect] *) In this case, by the same type of reasoning as before, if Q[n] is the number of moves required to move n disks from an end pole to the center and P[n] from the center to an end pole, we have: P[n+1]=2P[n]+1+Q[n] and Q[n+1]=2Q[n]+P[n]+1. (* :[font = input; initialization; preserveAspect; startGroup] *) RSolve[{P[n+1]==2P[n]+1+Q[n],Q[n+1]==2Q[n]+P[n]+1,Q[0]==0,P[0]==0}, \ {P[n],Q[n]},n] (* :[font = output; output; inactive; preserveAspect; endGroup] {{P[n] -> -1/2 + 3^n/2, Q[n] -> -1/2 + 3^n/2}} ;[o] n n 1 3 1 3 {{P[n] -> -(-) + --, Q[n] -> -(-) + --}} 2 2 2 2 :[font = input; initialization; preserveAspect] *) i.e., (* :[font = input; initialization; preserveAspect; startGroup] *) Q=(-1+3^n)/2 (* :[font = output; output; inactive; preserveAspect; endGroup] (-1 + 3^n)/2 ;[o] n -1 + 3 ------- 2 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) (Q/.{n->64})/((365+1/4)*24*60*60) (* :[font = output; output; inactive; preserveAspect; endGroup] 10730261938414101514555778404/197235 ;[o] 10730261938414101514555778404 ----------------------------- 197235 :[font = input; initialization; preserveAspect; startGroup] *) %//N (* :[font = output; output; inactive; preserveAspect; endGroup] 5.440343721151976837*10^22 ;[o] 22 5.44034 10 :[font = input; initialization; preserveAspect] *) Problem 3 a) (* :[font = input; initialization; preserveAspect] *) If we denote with "r" the one-month old pairs of rabbits and with "R" the pairs of grown-ups, we have: R[n+1]=R[n]+r[n] and r[n]=R[n-1], and therefore R[n+1]=R[n]+R[n-1]. (* :[font = input; initialization; preserveAspect; startGroup] *) 2R[n]/.RSolve[{R[n+1]==R[n]+R[n-1],R[0]==n0,R[1]==n0},R[n],n] \ //Factor (* :[font = output; output; inactive; preserveAspect; endGroup] {((-(1/2 - 5^(1/2)/2)^n + 5^(1/2)*(1/2 - 5^(1/2)/2)^n + (1/2 + 5^(1/2)/2)^n + 5^(1/2)*(1/2 + 5^(1/2)/2)^n)*n0* If[n >= 0, 1, 0])/5^(1/2)} ;[o] 1 Sqrt[5] n 1 Sqrt[5] n {((-(- - -------) + Sqrt[5] (- - -------) + 2 2 2 2 1 Sqrt[5] n 1 Sqrt[5] n (- + -------) + Sqrt[5] (- + -------) ) n0 2 2 2 2 If[n >= 0, 1, 0]) / Sqrt[5]} :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) %[[1]]/.{n0->1}/.{n->12*10}//Expand (* :[font = output; output; inactive; preserveAspect; endGroup] 17340014797015897316103842 ;[o] 17340014797015897316103842 ^*)