{VERSION 3 0 "IBM INTEL NT" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "2D Input" 2 19 "" 0 1 255 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "2 D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 256 " " 1 16 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 } {CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 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 "Maple Plot" 0 13 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT 256 25 "Exponential curve fitting " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 170 "We u se linear least squares fitting to observe the exponential behaviour i n the voltage of a capacitor as it charges or discharges in an RC circ uit as a function of time." }}{PARA 0 "" 0 "" {TEXT -1 134 "The fittin g of an exponential function can be accomplished through linear least \+ squares (LLSQ) after taking the logarithm of the data." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(p lots):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "We define a linear leas t squares procedure: (developed in the worksheet " }{TEXT 19 16 "DataA nalysis.mws" }{TEXT -1 1 ")" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "addme:=arg->evalf(Sum(arg[_i],_i=1..nops(arg)));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&addmeGR6#%$argG6\"6$%)operatorG%&arrowGF(-%&evalf G6#-%$SumG6$&9$6#%#_iG/F5;\"\"\"-%%nopsG6#F3F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "addpr:=(arg1,arg2)->evalf(Sum(arg1[_i]*arg2 [_i],_i=1..nops(arg1)));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&addprGR 6$%%arg1G%%arg2G6\"6$%)operatorG%&arrowGF)-%&evalfG6#-%$SumG6$*&&9$6#% #_iG\"\"\"&9%F6F8/F7;F8-%%nopsG6#F5F)F)F)" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 62 "LLSQ:=proc(xv,yv) local _i,N,a,b,c,d,Delta,A,B,sq,s igsq,dA,dB;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "N:=nops(xv);" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "if nops(yv) " 0 "" {MPLTEXT 1 0 16 "c: =addpr(xv,xv);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "d:=addme(xv);" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "a:=addpr(xv,yv);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "b:=addme(yv);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "Delta:=evalf(N*c-d^2);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "A:=(c *b-d*a)/Delta;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "B:=(N*a-d*b)/Delt a;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "sq:=[]; _i:='_i': for _i from 1 to N do:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "sq:=[op(sq),evalf(yv [_i]-A-B*xv[_i])]: od:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "sigsq:=ad dpr(sq,sq)/(N-2);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "dA:=sigsq*c/De lta;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "dB:=evalf(N*sigsq)/Delta;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "print(`[A,B,sigma,dA,dB]`);" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "[A,B,evalf(sqrt(sigsq),4),evalf(sqr t(dA),4),evalf(sqrt(dB),4)];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "The time at which the capacitor voltage was measured (in seconds):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "Times:=[] :" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "for i from 1 to 21 do:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "Time:=(i-1)*10: Times:=[op(Times),T ime]: od:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "Times;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#77\"\"!\"#5\"#?\"#I\"#S\"#]\"#g\"#q\"# !)\"#!*\"$+\"\"$5\"\"$?\"\"$I\"\"$S\"\"$]\"\"$g\"\"$q\"\"$!=\"$!>\"$+# " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 145 "The voltage across a big ele ctrolytic capacitor while being connected to 8.1 Volts through a 1000 \+ Ohm resistor at these times was measured to be:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 116 "V_Cchg:=[0.025,0.555,1.04,1.47,1.85,2.16,2.43 ,2.66,2.83,3.05,3.22,3.38,3.52,3.66,3.79,3.9,3.97,4.15,4.25,4.34,4.43] ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'V_CchgG77$\"#D!\"$$\"$b&F($\"$ /\"!\"#$\"$Z\"F-$\"$&=F-$\"$;#F-$\"$V#F-$\"$m#F-$\"$$GF-$\"$0$F-$\"$A$ F-$\"$Q$F-$\"$_$F-$\"$m$F-$\"$z$F-$\"#R!\"\"$\"$(RF-$\"$:%F-$\"$D%F-$ \"$M%F-$\"$V%F-" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 300 "The battery v oltage was 8.1 Volts. The capacitor charged maximally to 7.4 Volts whe n fed through a 1000 Ohm resistor! A leaking current of 0.7 mA account ing for the voltage drop across the resistor in the steady-state regim e was observed for the electrolytic capacitor. A non-ideal world after all..." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 94 "We generate a graph of the data points. First for the charging reg ime, then for the discharge." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "i:='i': PL_c:=[seq([Times[i],V_Cchg[i]],i=1..nops(Times))]:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "P_c:=plot(PL_c,style=point,s ymbol=cross,color=red): display(P_c);" }}{PARA 13 "" 1 "" {GLPLOT2D 643 192 192 {PLOTDATA 2 "6%-%'CURVESG6&777$\"\"!$\"1+++++++D!#<7$$\"#5 F($\"1++++++]b!#;7$$\"#?F($\"1++++++S5!#:7$$\"#IF($\"1++++++q9F77$$\"# SF($\"1++++++]=F77$$\"#]F($\"1++++++g@F77$$\"#gF($\"1++++++ICF77$$\"#q F($\"1++++++gEF77$$\"#!)F($\"1++++++IGF77$$\"#!*F($\"1++++++]IF77$$\"$ +\"F($\"1++++++?KF77$$\"$5\"F($\"1++++++!Q$F77$$\"$?\"F($\"1++++++?NF7 7$$\"$I\"F($\"1++++++gOF77$$\"$S\"F($\"1++++++!z$F77$$\"$]\"F($\"1++++ +++RF77$$\"$g\"F($\"1++++++qRF77$$\"$q\"F($\"1++++++]TF77$$\"$!=F($\"1 ++++++]UF77$$\"$!>F($\"1++++++SVF77$$\"$+#F($\"1++++++IWF7-%'COLOURG6& %$RGBG$\"*++++\"!\")F(F(-%&STYLEG6#%&POINTG-%'SYMBOLG6#%&CROSSG-%+AXES LABELSG6$%!GF^s-%%VIEWG6$%(DEFAULTGFbs" 1 2 0 1 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 119 "The cap acitor was discharged through the same resistor. We reset time to zero and use the same time interval as before." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 112 "V_Cdis:=[4.29,3.96,3.67,3.42,3.19,2.98,2.79,2.62,2 .45,2.3,2.15,2.02,1.9,1.78,1.67,1.57,1.47,1.39,1.3,1.23,1.15];" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%'V_CdisG77$\"$H%!\"#$\"$'RF($\"$n$F( $\"$U$F($\"$>$F($\"$)HF($\"$z#F($\"$i#F($\"$X#F($\"#B!\"\"$\"$:#F($\"$ -#F($\"#>F;$\"$y\"F($\"$n\"F($\"$d\"F($\"$Z\"F($\"$R\"F($\"#8F;$\"$B\" F($\"$:\"F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "i:='i': PL_d :=[seq([Times[i],V_Cdis[i]],i=1..nops(Times))]:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 53 "P_d:=plot(PL_d,style=point,symbol=cross,color= green):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "display(P_d);" } }{PARA 13 "" 1 "" {GLPLOT2D 648 226 226 {PLOTDATA 2 "6%-%'CURVESG6&777 $\"\"!$\"1++++++!H%!#:7$$\"#5F($\"1++++++gRF+7$$\"#?F($\"1++++++qOF+7$ $\"#IF($\"1++++++?MF+7$$\"#SF($\"1++++++!>$F+7$$\"#]F($\"1++++++!)HF+7 $$\"#gF($\"1++++++!z#F+7$$\"#qF($\"1++++++?EF+7$$\"#!)F($\"1++++++]CF+ 7$$\"#!*F($\"1+++++++BF+7$$\"$+\"F($\"1++++++]@F+7$$\"$5\"F($\"1++++++ ??F+7$$\"$?\"F($\"1+++++++>F+7$$\"$I\"F($\"1++++++!y\"F+7$$\"$S\"F($\" 1++++++q;F+7$$\"$]\"F($\"1++++++q:F+7$$\"$g\"F($\"1++++++q9F+7$$\"$q\" F($\"1++++++!R\"F+7$$\"$!=F($\"1+++++++8F+7$$\"$!>F($\"1++++++I7F+7$$ \"$+#F($\"1++++++]6F+-%'COLOURG6&%$RGBGF($\"*++++\"!\")F(-%&STYLEG6#%& POINTG-%'SYMBOLG6#%&CROSSG-%+AXESLABELSG6$%!GF\\s-%%VIEWG6$%(DEFAULTGF `s" 1 2 0 1 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 154 "The discharge regime is easy to analyze, we have an exponential decay. Taking the log of the data allows to ex tract the decay constant using LLSQ fitting:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "ln_of_V_Cdis:=map(ln,V_Cdis);" }}{PARA 12 "" 1 " " {XPPMATH 20 "6#>%-ln_of_V_CdisG77$\"+LnGc9!\"*$\"+DSCw8F($\"+i;>+8F( $\"+^0kH7F($\"+<4-g6F($\"+,L#>4\"F($\"+'fTg-\"F($\"+yJuJ'*!#5$\"+Y-)3' *)F7$\"+H74H$)F7$\"+@%yYl(F7$\"+9^(4.(F7$\"+i)Q&=kF7$\"+VO8mdF7$\"+kiB G^F7$\"+%>c2^%F7$\"+3Si_QF7$\"+ru.$H$F7$\"+XEkBEF7$\"+%pT,2#F7$\"+C%>w R\"F7" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "i:='i': PL_dl:=[se q([Times[i],ln_of_V_Cdis[i]],i=1..nops(Times))]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "P_dl:=plot(PL_dl,style=point,symbol=cross,col or=blue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "display(P_dl); " }}{PARA 13 "" 1 "" {GLPLOT2D 646 224 224 {PLOTDATA 2 "6%-%'CURVESG6& 777$\"\"!$\"1+++LnGc9!#:7$$\"#5F($\"1+++DSCw8F+7$$\"#?F($\"1+++i;>+8F+ 7$$\"#IF($\"1+++^0kH7F+7$$\"#SF($\"1+++<4-g6F+7$$\"#]F($\"1+++,L#>4\"F +7$$\"#gF($\"1+++'fTg-\"F+7$$\"#qF($\"1+++yJuJ'*!#;7$$\"#!)F($\"1+++Y- )3'*)FO7$$\"#!*F($\"1+++H74H$)FO7$$\"$+\"F($\"1+++@%yYl(FO7$$\"$5\"F($ \"1+++9^(4.(FO7$$\"$?\"F($\"1*****>')Q&=kFO7$$\"$I\"F($\"1+++VO8mdFO7$ $\"$S\"F($\"1+++kiBG^FO7$$\"$]\"F($\"1+++%>c2^%FO7$$\"$g\"F($\"1+++3Si _QFO7$$\"$q\"F($\"1+++ru.$H$FO7$$\"$!=F($\"1+++XEkBEFO7$$\"$!>F($\"1++ +%pT,2#FO7$$\"$+#F($\"1+++C%>wR\"FO-%'COLOURG6&%$RGBGF(F($\"*++++\"!\" )-%&STYLEG6#%&POINTG-%'SYMBOLG6#%&CROSSG-%+AXESLABELSG6$%!GF]s-%%VIEWG 6$%(DEFAULTGFas" 1 2 0 1 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 }} }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "This looks perfectly linear, and thus we have confidence in the fit." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "i:='i': sol_d:=LLSQ(Times,ln_of_V_Cdis);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%2[A,B,sigma,dA,dB]G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&sol_dG7'$\"+!)>%eU\"!\"*$!+mh5$\\'!#7$\"%>6!\"&$\"%8 Z!\"'$\"%JS!\")" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "tau:=-1/ sol_d[2];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$tauG$\"+[\\4S:!\"(" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "We discharged the capacitor with \+ a 1 kOhm resistor." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "evalf (tau/1000);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+[\\4S:!#5" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "evalf(%*10^6);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#$\"+[\\4S:!\"%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 122 "The capacitor was actually rated at 110 000 microFarads. We gr aph the fit together with the original voltage measurements:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "y_d:=exp(sol_d[1]+sol_d[2]*t );" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$y_dG-%$expG6#,&$\"+!)>%eU\"! \"*\"\"\"%\"tG$!+mh5$\\'!#7" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "P_dfit:=plot(y_d,t=0..200,color=black):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "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bs$\"10T\"*zjj,8F+7$$\"1nm;9@B M=Fbs$\"1fIsAhsk7F+7$$\"1LLL`v&Q(=Fbs$\"1n7hg2gK7F+7$$\"1++DOl5;>Fbs$ \"1I#>XwY#*>\"F+7$$\"1++v.Uac>Fbs$\"15'H`So\"o6F+7$$\"$+#F($\"1;37&onc 8\"F+-%'COLOURG6&%$RGBGF(F(F(-F$6&777$F($\"1++++++!H%F+7$$\"#5F($\"1++ ++++gRF+7$$\"#?F($\"1++++++qOF+7$$\"#IF($\"1++++++?MF+7$$\"#SF($\"1+++ +++!>$F+7$$\"#]F($\"1++++++!)HF+7$$\"#gF($\"1++++++!z#F+7$$\"#qF($\"1+ +++++?EF+7$$\"#!)F($\"1++++++]CF+7$$\"#!*F($\"1+++++++BF+7$$\"$+\"F($ \"1++++++]@F+7$$\"$5\"F($\"1++++++??F+7$$\"$?\"F($\"1+++++++>F+7$$\"$I \"F($\"1++++++!y\"F+7$$\"$S\"F($\"1++++++q;F+7$$\"$]\"F($\"1++++++q:F+ 7$$\"$g\"F($\"1++++++q9F+7$$\"$q\"F($\"1++++++!R\"F+7$$\"$!=F($\"1++++ +++8F+7$$\"$!>F($\"1++++++I7F+7$Fdz$\"1++++++]6F+-Fiz6&F[[lF($\"*++++ \"!\")F(-%&STYLEG6#%&POINTG-%'SYMBOLG6#%&CROSSG-%(SCALINGG6#%.UNCONSTR AINEDG-%+AXESLABELSG6$Q\"t6\"%!G-%%VIEWG6$;F(Fdz%(DEFAULTG" 1 2 0 1 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "The charging regime is described by the expression" }} {PARA 0 "" 0 "" {XPPEDIT 18 0 "V[C] = U[0]*(1-exp(-t/(R*C)));" "6#/&% \"VG6#%\"CG*&&%\"UG6#\"\"!\"\"\",&\"\"\"F--%$expG6#,$*&%\"tGF-*&%\"RGF -%\"CGF-!\"\"F9F9F-" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 386 "To analyze the chargin g data we need a map that first divides out the final voltage (the one reached for asymptotic times, which in our case is 7.4V and not the b attery voltage due to the leakage) from the datapoints, and computes \+ the difference to 1. Then we take the logarithm of the voltages. The r eal part in the map below is taken to avoid a wrong complex-valued cho ice of branch." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "myfun:=x- >Re(ln(1-x/7.4));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&myfunGR6#%\"xG 6\"6$%)operatorG%&arrowGF(-%#ReG6#-%#lnG6#,&\"\"\"F39$$!+^8N^8!#5F(F(F (" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "ln_of_V_Cchg:=map(myfu n,V_Cchg);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%-ln_of_V_CchgG77$!+1!) 4%Q$!#7$!+ZT:'z(!#6$!+Gi^9:!#5$!+ryb9AF.$!+B2#o(GF.$!+<]e^MF.$!++;g!)R F.$!+W'GWX%F.$!+^zm>[F.$!+]:/8`F.$!+Mvo6dF.$!+t4)>5'F.$!+k%[kX'F.$!+') Q%R#oF.$!+vAsxrF.$!+9.<([(F.$!+'Q(>*o(F.$!+O+DG#)F.$!+raxS&)F.$!+Q3lI) )F.$!+q/=H\"*F." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "i:='i': \+ PL_cl:=[seq([Times[i],ln_of_V_Cchg[i]],i=1..nops(Times))]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "P_cl:=plot(PL_cl,style=point,symbol =cross,color=blue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "disp lay(P_cl,scaling=unconstrained);" }}{PARA 13 "" 1 "" {GLPLOT2D 644 228 228 {PLOTDATA 2 "6&-%'CURVESG6&777$\"\"!$!1+++1!)4%Q$!#=7$$\"#5F($ !1,++ZT:'z(!#<7$$\"#?F($!1+++Gi^9:!#;7$$\"#IF($!1+++ryb9AF77$$\"#SF($! 1+++B2#o(GF77$$\"#]F($!1+++<]e^MF77$$\"#gF($!1++++;g!)RF77$$\"#qF($!1+ ++W'GWX%F77$$\"#!)F($!1+++^zm>[F77$$\"#!*F($!1******\\:/8`F77$$\"$+\"F ($!1+++Mvo6dF77$$\"$5\"F($!1+++t4)>5'F77$$\"$?\"F($!1+++k%[kX'F77$$\"$ I\"F($!1+++')Q%R#oF77$$\"$S\"F($!1+++vAsxrF77$$\"$]\"F($!1+++9.<([(F77 $$\"$g\"F($!1+++'Q(>*o(F77$$\"$q\"F($!1+++O+DG#)F77$$\"$!=F($!1*****4Z v2a)F77$$\"$!>F($!1+++Q3lI))F77$$\"$+#F($!1+++q/=H\"*F7-%'COLOURG6&%$R GBGF(F($\"*++++\"!\")-%&STYLEG6#%&POINTG-%'SYMBOLG6#%&CROSSG-%(SCALING G6#%.UNCONSTRAINEDG-%+AXESLABELSG6$%!GFbs-%%VIEWG6$%(DEFAULTGFfs" 1 2 0 1 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 167 "We observe that the data points behave linearly for the first third, and then turn over to a different slope. Thus, we pi ck out a part of the data set for the fitting." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "nops(Times) ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#@" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 77 "Times1:=[seq(Times[i],i=1..7)]: ln_of_V_Cchg1:=[seq (ln_of_V_Cchg[i],i=1..7)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "sol_c:=LLSQ(Times1,ln_of_V_Cchg1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%2[A,B,sigma,dA,dB]G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&sol_c G7'$!+b_?X8!#6$!+L\"fPi'!#7$\"%:(*!\"'$\"%>mF.$\"%O=!\"(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "tau_c:=-1/sol_c[2];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&tau_cG$\"+Lnr4:!\"(" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 23 "C_c:=evalf(tau_c/1000);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$C_cG$\"+Lnr4:!#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "evalf(C_c*10^6*mu*F);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,$*&%#muG\"\"\"%\"FGF&$\"+Lnr4:!\"%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "The value of the capacitance is apparently quite close t o the one obtained from the discharge cycle." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 257 10 "Exercise: " }}{PARA 0 "" 0 "" {TEXT -1 164 "Use the uncertainty on the slopes for the charge and dis charge cycles to determine whether the two determinations of the capac itance are consistent with each other." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT 258 10 "Exercise: " }}{PARA 0 "" 0 "" {TEXT -1 123 "Use Maple's built-in LLSQ procedure (use ?fit to determine its usage) to perform a fit for which the intercept is fixed as " }{TEXT 259 1 "A" }{TEXT -1 89 "=0 (only the slope is determined from the fit) . Compare your results for the capacitance." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 260 16 "Systematic Error" }}{PARA 0 " " 0 "" {TEXT -1 168 "If we had used all the data points from the charg ing cycle, we would have obtained a smaller slope in the linear fit, a nd as a result a substantially larger capacitance" }}{PARA 0 "" 0 "" {TEXT -1 596 "(about 30% higher, but also a much larger uncertainty). \+ To use such a fit blindly (without checking whether the data to be fit ted look like a straight line with statistical scatter) would result i n the introduction of a systematic error. The physical reason for this systematic error is the strange behaviour in the charge cycle, whereb y the capacictor never charges up to the full voltage, and a leakage c urrent persists in the asymptotic time regime. The capacitor we used w as an old specimen (garage sale purchase), and is likely to be faulty, i.e., probably performed better when it was new. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 85 "We compare the fit result with the data over the full charge time that was observed." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "y_c:=7.4*(1-exp(-t/tau_c)); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$y_cG,&$\"#u!\"\"\"\"\"-%$expG6# ,$%\"tG$!+M\"fPi'!#7$!#uF(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "P_cfit:=plot(y_c,t=0..200,color=black):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "display(\{P_cfit,P_c\});" }}{PARA 13 "" 1 "" {GLPLOT2D 644 198 198 {PLOTDATA 2 "6&-%'CURVESG6&777$\"\"!$\"1+++++++D !#<7$$\"#5F($\"1++++++]b!#;7$$\"#?F($\"1++++++S5!#:7$$\"#IF($\"1++++++ q9F77$$\"#SF($\"1++++++]=F77$$\"#]F($\"1++++++g@F77$$\"#gF($\"1++++++I CF77$$\"#qF($\"1++++++gEF77$$\"#!)F($\"1++++++IGF77$$\"#!*F($\"1++++++ ]IF77$$\"$+\"F($\"1++++++?KF77$$\"$5\"F($\"1++++++!Q$F77$$\"$?\"F($\"1 ++++++?NF77$$\"$I\"F($\"1++++++gOF77$$\"$S\"F($\"1++++++!z$F77$$\"$]\" F($\"1+++++++RF77$$\"$g\"F($\"1++++++qRF77$$\"$q\"F($\"1++++++]TF77$$ \"$!=F($\"1++++++]UF77$$\"$!>F($\"1++++++SVF77$$\"$+#F($\"1++++++IWF7- %'COLOURG6&%$RGBG$\"*++++\"!\")F(F(-%&STYLEG6#%&POINTG-%'SYMBOLG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