(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 74619, 1741] NotebookOptionsPosition[ 71584, 1628] NotebookOutlinePosition[ 72000, 1646] CellTagsIndexPosition[ 71957, 1643] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["APPENDIX A", "Text", CellChangeTimes->{{3.3931681445083933`*^9, 3.393168149137631*^9}}, TextAlignment->Left, FontSize->16, FontWeight->"Bold"], Cell["Simultaneous determination of k, n and Tc.", "Text", CellChangeTimes->{{3.393253902157148*^9, 3.3932539041373873`*^9}, { 3.393253955422089*^9, 3.393253988587735*^9}, 3.393256321009637*^9}, TextAlignment->Left, FontSize->16, FontWeight->"Bold"], Cell["\<\ Programmed by: Mark D. Normand and Micha Peleg Last modified: August 1, 2007\ \>", "Text", CellChangeTimes->{{3.393168181924315*^9, 3.393168198891725*^9}, 3.393251160115095*^9, 3.39332011478198*^9, {3.393339984565557*^9, 3.393339985027905*^9}, {3.393341267796788*^9, 3.3933412735904903`*^9}, 3.393768131682469*^9, 3.393844075005616*^9, {3.394190265187067*^9, 3.394190265395576*^9}, {3.3949606069721947`*^9, 3.394960608655511*^9}}, TextAlignment->Left, FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Assign the three parameters k, n and Tc their original values. These are the \ values we are trying to recover.\ \>", "Text", CellChangeTimes->{{3.393253624737135*^9, 3.3932536441172047`*^9}, { 3.393325187213808*^9, 3.393325205517309*^9}, {3.393328605242693*^9, 3.393328606694022*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"k", "=", "0.05"}], ";", RowBox[{"n", "=", "0.9"}], ";", RowBox[{"Tc", "=", "80."}], ";"}]], "Input", CellChangeTimes->{3.393241936908412*^9}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Assign the three final time survival values at the original values of the \ three parameters.\ \>", "Text", CellChangeTimes->{{3.393327709047627*^9, 3.393327709592849*^9}, { 3.393328629989909*^9, 3.3933286575575323`*^9}, 3.393341347327615*^9}, TextAlignment->Left, FontSize->14], Cell[BoxData[{ RowBox[{ RowBox[{"lstCycle1", "=", RowBox[{"-", "3.56086"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lstCycle2", "=", RowBox[{"-", "6.34801"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lstCycle3", "=", RowBox[{"-", "9.73642"}]}], ";"}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Assign the final time value, tCycle.", "Text", CellChangeTimes->{{3.393341325722166*^9, 3.3933413350988073`*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"tCycle", "=", "8."}], ";"}]], "Input", CellChangeTimes->{3.393238132173972*^9}, FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell["Define the three temperature profile functions.", "Text", CellChangeTimes->{{3.393168351042939*^9, 3.393168364232419*^9}, 3.3932537841910152`*^9, 3.393322299976026*^9, {3.3933223521656*^9, 3.393322353083847*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"T1", "[", "t_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"25.", "+", RowBox[{"20.", "*", RowBox[{"t", "^", ".70"}]}]}], ")"}], "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"Exp", "[", RowBox[{"1", "*", RowBox[{"(", RowBox[{"t", "-", "8.5"}], ")"}]}], "]"}]}], ")"}]}]}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"T2", "[", "t_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"35.", "+", RowBox[{"25.", "*", RowBox[{"t", "^", ".65"}]}]}], ")"}], "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"Exp", "[", RowBox[{"1", "*", RowBox[{"(", RowBox[{"t", "-", "8.5"}], ")"}]}], "]"}]}], ")"}]}]}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"T3", "[", "t_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"45.", "+", RowBox[{"30.", "*", RowBox[{"t", "^", ".60"}]}]}], ")"}], "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"Exp", "[", RowBox[{"1", "*", RowBox[{"(", RowBox[{"t", "-", "8.5"}], ")"}]}], "]"}]}], ")"}]}]}], ";"}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Compute the three temperatures at time tCycle using the three temperature \ profile functions.\ \>", "Text", CellChangeTimes->{{3.393322237848249*^9, 3.3933222418990507`*^9}, { 3.393325056163465*^9, 3.3933250652433043`*^9}, {3.393325526678794*^9, 3.393325542925816*^9}, {3.393326043888006*^9, 3.393326044481868*^9}, 3.393327194632271*^9}, TextAlignment->Left, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"tCycleT1", "=", RowBox[{"T1", "[", "tCycle", "]"}]}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "tCycleT1"}], "]"}]}]], "Input", CellChangeTimes->{{3.393322100432173*^9, 3.3933221278763723`*^9}, 3.39332554916901*^9, {3.393325607619711*^9, 3.393325612349854*^9}, 3.393326084597148*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"T1[tCycle]=\"\>", "\[InvisibleSpace]", "68.93231469526532`"}], SequenceForm["T1[tCycle]=", 68.93231469526532], Editable->False]], "Print", CellChangeTimes->{3.393320121581217*^9, 3.3933221852294617`*^9, 3.393323123591468*^9, 3.3933252890246973`*^9, 3.3933254396472607`*^9, 3.3933257653010883`*^9, 3.393326611064291*^9, 3.393327059591311*^9, 3.393327201570022*^9, 3.393327837129407*^9, 3.3933286890721703`*^9, 3.393339018778117*^9, 3.393341301635853*^9, 3.393341787060822*^9, 3.393768137702388*^9, 3.393768238721755*^9, 3.393844144482864*^9, 3.3941906364993677`*^9, 3.39419464112774*^9, 3.394195024128025*^9, 3.394203324320195*^9, 3.3949596669301558`*^9, 3.3949600952184153`*^9, 3.39496020975946*^9, 3.394960241518434*^9, 3.394960613826387*^9, 3.3949614851621857`*^9, 3.3949616906047497`*^9, 3.394963491262267*^9, 3.394963878605187*^9, 3.39496487173556*^9, 3.394967173245634*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"tCycleT2", "=", RowBox[{"T2", "[", "tCycle", "]"}]}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "tCycleT2"}], "]"}]}]], "Input", CellChangeTimes->{{3.39332215124137*^9, 3.3933221528608713`*^9}, { 3.393325557500794*^9, 3.393325579892871*^9}, 3.393325619031274*^9, 3.39332609024548*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"T2[tCycle]=\"\>", "\[InvisibleSpace]", "81.91168472067831`"}], SequenceForm["T2[tCycle]=", 81.91168472067831], Editable->False]], "Print", CellChangeTimes->{3.393320121694007*^9, 3.393322185357984*^9, 3.393323123750484*^9, 3.393325289185557*^9, 3.393325439912942*^9, 3.3933257654491453`*^9, 3.393326611145443*^9, 3.3933270598144608`*^9, 3.393327201651826*^9, 3.393327837210575*^9, 3.393328689155407*^9, 3.393339018860034*^9, 3.3933413017423553`*^9, 3.3933417871582623`*^9, 3.393768137807526*^9, 3.3937682388145523`*^9, 3.393844144584133*^9, 3.394190636580682*^9, 3.394194641235832*^9, 3.394195024225338*^9, 3.39420332441868*^9, 3.394959667009986*^9, 3.39496009528869*^9, 3.394960209849423*^9, 3.3949602415982933`*^9, 3.394960613907619*^9, 3.394961485227672*^9, 3.394961690674549*^9, 3.394963491342585*^9, 3.394963878662035*^9, 3.394964871825856*^9, 3.394967173331924*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"tCycleT3", "=", RowBox[{"T3", "[", "tCycle", "]"}]}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "tCycleT3"}], "]"}]}]], "Input", CellChangeTimes->{{3.393322170793523*^9, 3.393322172397147*^9}, { 3.393325566670063*^9, 3.393325582959031*^9}, 3.393325626854475*^9, 3.3933261158418827`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"T3[tCycle]=\"\>", "\[InvisibleSpace]", "93.03654847288784`"}], SequenceForm["T3[tCycle]=", 93.03654847288784], Editable->False]], "Print", CellChangeTimes->{3.3933201217909107`*^9, 3.393322185505349*^9, 3.393323123897531*^9, 3.393325289315895*^9, 3.393325440102467*^9, 3.3933257655674067`*^9, 3.393326611225205*^9, 3.393327059898323*^9, 3.393327201743946*^9, 3.3933278373035583`*^9, 3.3933286892366247`*^9, 3.3933390189409037`*^9, 3.39334130184315*^9, 3.3933417872473917`*^9, 3.393768137893032*^9, 3.393768238893093*^9, 3.393844144690846*^9, 3.394190636662025*^9, 3.394194641302989*^9, 3.394195024319271*^9, 3.394203324498796*^9, 3.3949596670867367`*^9, 3.394960095355447*^9, 3.39496020992784*^9, 3.394960241677791*^9, 3.394960613985651*^9, 3.3949614852860394`*^9, 3.394961690743464*^9, 3.394963491425802*^9, 3.394963878714937*^9, 3.394964871894867*^9, 3.394967173411784*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Define the three survival functions as function modules.", "Text", CellChangeTimes->{{3.3933277119529543`*^9, 3.393327712248871*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"LS1", "[", RowBox[{ RowBox[{"k_", "?", "NumericQ"}], ",", RowBox[{"n_", "?", "NumericQ"}], ",", RowBox[{"Tc_", "?", "NumericQ"}], ",", RowBox[{"tc_", "?", "NumericQ"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"b1", ",", "sfn1", ",", "t", ",", "T1", ",", "y1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"T1", "[", "t_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"25.", "+", RowBox[{"20.", "*", RowBox[{"t", "^", ".70"}]}]}], ")"}], "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"Exp", "[", RowBox[{"1", "*", RowBox[{"(", RowBox[{"t", "-", "8.5"}], ")"}]}], "]"}]}], ")"}]}]}], ";", RowBox[{ RowBox[{"b1", "[", "t_", "]"}], ":=", RowBox[{"Log", "[", RowBox[{"1.", "+", RowBox[{"Exp", "[", RowBox[{"k", "*", RowBox[{"(", RowBox[{ RowBox[{"T1", "[", "t", "]"}], "-", "Tc"}], ")"}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"sfn1", "[", "t_", "]"}], "=", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"y1", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", RowBox[{"b1", "[", "t", "]"}]}], "*", "n", "*", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"y1", "[", "t", "]"}]}], "/", RowBox[{"b1", "[", "t", "]"}]}], ")"}], "^", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "1."}], ")"}], "/", "n"}], ")"}]}]}]}], ",", RowBox[{ RowBox[{"y1", "[", "0.", "]"}], "\[Equal]", RowBox[{"-", ".00001"}]}]}], "}"}], ",", RowBox[{"y1", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.001", ",", RowBox[{"tCycle", "+", "1."}]}], "}"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sfn1", "[", "tc", "]"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"LS2", "[", RowBox[{ RowBox[{"k_", "?", "NumericQ"}], ",", RowBox[{"n_", "?", "NumericQ"}], ",", RowBox[{"Tc_", "?", "NumericQ"}], ",", RowBox[{"tc_", "?", "NumericQ"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"b2", ",", "sfn2", ",", "t", ",", "T2", ",", "y2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"T2", "[", "t_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"35.", "+", RowBox[{"25.", "*", RowBox[{"t", "^", ".65"}]}]}], ")"}], "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"Exp", "[", RowBox[{"1", "*", RowBox[{"(", RowBox[{"t", "-", "8.5"}], ")"}]}], "]"}]}], ")"}]}]}], ";", RowBox[{ RowBox[{"b2", "[", "t_", "]"}], ":=", RowBox[{"Log", "[", RowBox[{"1.", "+", RowBox[{"Exp", "[", RowBox[{"k", "*", RowBox[{"(", RowBox[{ RowBox[{"T2", "[", "t", "]"}], "-", "Tc"}], ")"}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"sfn2", "[", "t_", "]"}], "=", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"y2", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", RowBox[{"b2", "[", "t", "]"}]}], "*", "n", "*", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"y2", "[", "t", "]"}]}], "/", RowBox[{"b2", "[", "t", "]"}]}], ")"}], "^", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "1."}], ")"}], "/", "n"}], ")"}]}]}]}], ",", RowBox[{ RowBox[{"y2", "[", "0.", "]"}], "\[Equal]", RowBox[{"-", ".00001"}]}]}], "}"}], ",", RowBox[{"y2", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.001", ",", RowBox[{"tCycle", "+", "1."}]}], "}"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sfn2", "[", "tc", "]"}]}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"LS3", "[", RowBox[{ RowBox[{"k_", "?", "NumericQ"}], ",", RowBox[{"n_", "?", "NumericQ"}], ",", RowBox[{"Tc_", "?", "NumericQ"}], ",", RowBox[{"tc_", "?", "NumericQ"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"b3", ",", "sfn3", ",", "t", ",", "T3", ",", "y3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"T3", "[", "t_", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"45.", "+", RowBox[{"30.", "*", RowBox[{"t", "^", ".60"}]}]}], ")"}], "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"Exp", "[", RowBox[{"1", "*", RowBox[{"(", RowBox[{"t", "-", "8.5"}], ")"}]}], "]"}]}], ")"}]}]}], ";", RowBox[{ RowBox[{"b3", "[", "t_", "]"}], ":=", RowBox[{"Log", "[", RowBox[{"1.", "+", RowBox[{"Exp", "[", RowBox[{"k", "*", RowBox[{"(", RowBox[{ RowBox[{"T3", "[", "t", "]"}], "-", "Tc"}], ")"}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"sfn3", "[", "t_", "]"}], "=", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"y3", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", RowBox[{"b3", "[", "t", "]"}]}], "*", "n", "*", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"y3", "[", "t", "]"}]}], "/", RowBox[{"b3", "[", "t", "]"}]}], ")"}], "^", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "1."}], ")"}], "/", "n"}], ")"}]}]}]}], ",", RowBox[{ RowBox[{"y3", "[", "0.", "]"}], "\[Equal]", RowBox[{"-", ".00001"}]}]}], "}"}], ",", RowBox[{"y3", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.001", ",", RowBox[{"tCycle", "+", "1."}]}], "}"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sfn3", "[", "tc", "]"}]}]}], "]"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Compute the three survival values at time tCycle using the original values \ for the parameters k, n and Tc.\ \>", "Text", CellChangeTimes->{{3.393322237848249*^9, 3.3933222418990507`*^9}, { 3.393325056163465*^9, 3.3933250652433043`*^9}, {3.393327714849176*^9, 3.393327715408972*^9}, {3.3933286670715427`*^9, 3.39332866829493*^9}}, TextAlignment->Left, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"LS1", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.393319966469637*^9, 3.393319998943075*^9}, { 3.393320064182743*^9, 3.393320064479691*^9}, {3.393322124789736*^9, 3.393322131563163*^9}, 3.3933256619833193`*^9, {3.393328440806755*^9, 3.3933284624275837`*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"LS1[k,n,Tc,tCycle]=\"\>", "\[InvisibleSpace]", RowBox[{"-", "3.560857877297127`"}]}], SequenceForm["LS1[k,n,Tc,tCycle]=", -3.560857877297127], Editable->False]], "Print", CellChangeTimes->{3.393320121581217*^9, 3.3933221852294617`*^9, 3.393323123591468*^9, 3.3933252890246973`*^9, 3.3933254396472607`*^9, 3.393325779579335*^9, 3.3933266114096413`*^9, 3.39332706028478*^9, 3.3933272019418087`*^9, 3.393327837503456*^9, 3.393328689457782*^9, 3.393339019298667*^9, 3.393341302034075*^9, 3.393341787434205*^9, 3.3937681382295427`*^9, 3.393768239077735*^9, 3.39384414491912*^9, 3.3941906369021053`*^9, 3.3941946415387163`*^9, 3.394195024627583*^9, 3.394203324677058*^9, 3.39495966741*^9, 3.394960095508278*^9, 3.3949602100975933`*^9, 3.3949602418481903`*^9, 3.3949606141582813`*^9, 3.3949614854364567`*^9, 3.3949616908886423`*^9, 3.394963491602689*^9, 3.394963878847652*^9, 3.394964872037624*^9, 3.3949671735885477`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"LS2", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.39332007300701*^9, 3.3933200828250637`*^9}, 3.393322161484642*^9, 3.393325693290319*^9, {3.393328469035684*^9, 3.393328472514614*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"LS2[k,n,Tc,tCycle]=\"\>", "\[InvisibleSpace]", RowBox[{"-", "6.348013272924269`"}]}], SequenceForm["LS2[k,n,Tc,tCycle]=", -6.348013272924269], Editable->False]], "Print", CellChangeTimes->{3.393320121694007*^9, 3.393322185357984*^9, 3.393323123750484*^9, 3.393325289185557*^9, 3.393325439912942*^9, 3.393325779705103*^9, 3.3933266115143642`*^9, 3.393327060391836*^9, 3.393327202047213*^9, 3.393327837595304*^9, 3.3933286895429773`*^9, 3.393339019404811*^9, 3.393341302127349*^9, 3.393341787541155*^9, 3.393768138319903*^9, 3.393768239170231*^9, 3.3938441450409327`*^9, 3.3941906370296392`*^9, 3.3941946416214952`*^9, 3.394195024712863*^9, 3.394203324782199*^9, 3.394959667502877*^9, 3.3949600955835457`*^9, 3.394960210178719*^9, 3.394960241929119*^9, 3.394960614237028*^9, 3.394961485499854*^9, 3.394961690967836*^9, 3.3949634916920757`*^9, 3.39496387891539*^9, 3.394964872116544*^9, 3.394967173667007*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"LS3", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.393320087098538*^9, 3.3933200985041313`*^9}, 3.393322181469367*^9, 3.393325697880682*^9, {3.393328477223815*^9, 3.393328481340178*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"LS3[k,n,Tc,tCycle]=\"\>", "\[InvisibleSpace]", RowBox[{"-", "9.73642130875272`"}]}], SequenceForm["LS3[k,n,Tc,tCycle]=", -9.73642130875272], Editable->False]], "Print", CellChangeTimes->{3.3933201217909107`*^9, 3.393322185505349*^9, 3.393323123897531*^9, 3.393325289315895*^9, 3.393325440102467*^9, 3.3933257798152037`*^9, 3.393326611610318*^9, 3.393327060510661*^9, 3.393327202142065*^9, 3.393327837688336*^9, 3.3933286896359453`*^9, 3.3933390196553507`*^9, 3.393341302222069*^9, 3.393341787845975*^9, 3.3937681385185337`*^9, 3.39376823926608*^9, 3.3938441453338413`*^9, 3.394190637141371*^9, 3.394194641745226*^9, 3.39419502480593*^9, 3.394203324884741*^9, 3.3949596675799513`*^9, 3.3949600956660433`*^9, 3.394960210271525*^9, 3.39496024200951*^9, 3.394960614317299*^9, 3.3949614855660067`*^9, 3.3949616910374537`*^9, 3.3949634917748537`*^9, 3.394963878981738*^9, 3.394964872186202*^9, 3.394967173746498*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Find values of the three parameters k, n and Tc that simultaneously solve the \ three survival equations at time tCycle. Give two initial guesses for each \ parameter in order to avoid the use of derivatives. NOTICE THAT THE \ SOLUTIONS ARE ALMOST IDENTICAL TO THE ORIGINAL PARAMETER VALUES k=0.05, n=0.9 \ and Tc=80. (The slight discrepancy is due to the rounding of lstCycle1, \ lstCycle2 and lstCycle3.)\ \>", "Text", CellChangeTimes->{{3.3932382688789*^9, 3.393238269494989*^9}, { 3.393243093902789*^9, 3.393243125209425*^9}, 3.393253598496396*^9, 3.393253749723592*^9, {3.3933252176594467`*^9, 3.393325233383534*^9}, { 3.3933262342727222`*^9, 3.3933262354459248`*^9}, {3.3933277198356867`*^9, 3.3933277210012293`*^9}, {3.393328674593845*^9, 3.393328676071*^9}, 3.3933416822146597`*^9, {3.393844063195136*^9, 3.393844065700686*^9}, { 3.393844337472574*^9, 3.393844340865069*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{"k", ",", "n", ",", "Tc"}], "]"}]], "Input", CellChangeTimes->{{3.393243616755053*^9, 3.3932436170077763`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"LS1", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle"}], "]"}], "==", "lstCycle1"}], ",", RowBox[{ RowBox[{"LS2", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle"}], "]"}], "\[Equal]", "lstCycle2"}], ",", RowBox[{ RowBox[{"LS3", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle"}], "]"}], "\[Equal]", "lstCycle3"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"k", ",", ".04", ",", ".045"}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", ".6", ",", ".7"}], "}"}], ",", RowBox[{"{", RowBox[{"Tc", ",", "50.", ",", "55."}], "}"}]}], "}"}], ",", RowBox[{"MaxIterations", "\[Rule]", "500"}], ",", RowBox[{"AccuracyGoal", "\[Rule]", "6"}], ",", RowBox[{"PrecisionGoal", "\[Rule]", "6"}]}], "]"}]], "Input", CellChangeTimes->{{3.393241157232133*^9, 3.393241203779924*^9}, 3.393241235337063*^9, {3.39496020179797*^9, 3.394960202273522*^9}, 3.3949602349821663`*^9, {3.394960310774068*^9, 3.394960330891343*^9}, { 3.3949604170068083`*^9, 3.394960526402029*^9}, {3.394960583267733*^9, 3.39496058513557*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"k", "\[Rule]", "0.04999963804016134`"}], ",", RowBox[{"n", "\[Rule]", "0.9000069226611157`"}], ",", RowBox[{"Tc", "\[Rule]", "80.00036498347139`"}]}], "}"}]], "Output", CellChangeTimes->{ 3.3931687123151217`*^9, 3.393238834655732*^9, 3.393241119796772*^9, 3.393241175743135*^9, 3.39324121643988*^9, 3.393241250957178*^9, 3.393243950369433*^9, 3.393244009966853*^9, 3.393251086417383*^9, 3.393253839954664*^9, 3.393254028134224*^9, 3.3933201326291523`*^9, 3.393323139280815*^9, 3.3933253001919394`*^9, 3.393325450955555*^9, 3.39332580582519*^9, 3.393326622768568*^9, 3.393327071513707*^9, 3.393327213914505*^9, 3.393327849208995*^9, 3.39332870059485*^9, 3.39333903129743*^9, 3.3933413142447166`*^9, 3.39334179920826*^9, 3.3937681496552353`*^9, 3.393768249599525*^9, 3.39384415654799*^9, 3.394190648138094*^9, 3.394194666285651*^9, 3.394195046188807*^9, 3.39420333674893*^9, 3.394959678713756*^9, 3.394960106751211*^9, { 3.3949602205629396`*^9, 3.39496024803575*^9}, 3.394960345479535*^9, 3.394960465748316*^9, 3.394960501958528*^9, 3.394960533554636*^9, { 3.394960590600037*^9, 3.3949606158457203`*^9}, 3.394961487120377*^9, 3.394961692780471*^9, 3.3949634933330717`*^9, 3.394963880579673*^9, 3.394964873920156*^9, 3.3949671756677628`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Plot the three temperature profile curves.", "Text", CellChangeTimes->{{3.393168351042939*^9, 3.393168364232419*^9}, 3.3932537841910152`*^9, 3.393322372504961*^9, {3.393323367039167*^9, 3.393323380899116*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"tempCurvePlot", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"T1", "[", "t", "]"}], ",", RowBox[{"T2", "[", "t", "]"}], ",", RowBox[{"T3", "[", "t", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.", ",", "8."}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.", ",", "10."}], "}"}], ",", RowBox[{"{", RowBox[{"0.", ",", "140."}], "}"}]}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", "0.01", "]"}], ",", "LightGray", ",", RowBox[{"Dashing", "[", "None", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", "0.01", "]"}], ",", "Gray", ",", RowBox[{"Dashing", "[", "None", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", "0.01", "]"}], ",", "Black", ",", RowBox[{"Dashing", "[", "None", "]"}]}], "}"}]}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", "\"\\""}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"RotateLabel", "\[Rule]", "True"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontWeight", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "14"}]}], "}"}]}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\<\>\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"FrameTicks", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "2", ",", "4", ",", "6", ",", "8", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{ "0", ",", "20", ",", "40", ",", "60", ",", "80", ",", "100", ",", "120", ",", "140"}], "}"}], ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}]}], "}"}]}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.393251050701592*^9, {3.393320294224659*^9, 3.393320333211245*^9}, { 3.393320571080579*^9, 3.393320590759631*^9}, {3.3933208225830812`*^9, 3.393320886103772*^9}, {3.393320919192649*^9, 3.3933209459323063`*^9}, { 3.393320993422297*^9, 3.393321031966597*^9}, {3.393321480456262*^9, 3.3933215239096737`*^9}, {3.393321595255995*^9, 3.393321647106287*^9}, { 3.393321707336195*^9, 3.39332171063087*^9}, {3.3933217576497927`*^9, 3.393321775498185*^9}, 3.3933218321220922`*^9, {3.393321874676762*^9, 3.393322013321027*^9}, {3.393323043264168*^9, 3.393323051596662*^9}, { 3.393323223959093*^9, 3.3933232250892553`*^9}, 3.393323513728169*^9, { 3.393323758811049*^9, 3.393323777192898*^9}, {3.393324056535119*^9, 3.393324057701312*^9}, {3.393324139126712*^9, 3.393324141726007*^9}, 3.3933254343125553`*^9, {3.393325824794448*^9, 3.393325852804388*^9}, { 3.393768110411003*^9, 3.393768111385027*^9}, {3.394190300473057*^9, 3.394190335350337*^9}, 3.394190368730852*^9, {3.394190450076414*^9, 3.394190473476864*^9}, 3.394961754246566*^9, 3.394963574587223*^9, { 3.394963642870945*^9, 3.394963643558456*^9}, {3.3949636827064857`*^9, 3.394963726043089*^9}, 3.3949637714028263`*^9}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ ListPlot the temperatures at time tCycle for the three temperature profile \ functions.\ \>", "Text", CellChangeTimes->{{3.393168351042939*^9, 3.393168364232419*^9}, 3.3932537841910152`*^9, {3.393322372504961*^9, 3.3933224384617233`*^9}, 3.393322770438449*^9, 3.3933233004745197`*^9, {3.3933239438840647`*^9, 3.393323944731514*^9}, 3.39332503330643*^9}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"tempPtsPlot", "=", RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"tCycle", ",", "tCycleT1"}], "}"}], ",", RowBox[{"{", RowBox[{"tCycle", ",", "tCycleT2"}], "}"}], ",", RowBox[{"{", RowBox[{"tCycle", ",", "tCycleT3"}], "}"}]}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.", ",", "10."}], "}"}], ",", RowBox[{"{", RowBox[{"0.", ",", "140."}], "}"}]}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Directive", "[", RowBox[{ RowBox[{"PointSize", "[", "Large", "]"}], ",", "Black"}], "]"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", "\"\\""}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"RotateLabel", "\[Rule]", "True"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontWeight", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "14"}]}], "}"}]}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{ "\"\