{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#Script to illustrate using Sage to analyze data concerning the decomposition of butadiene.\n", "\n", "#Times at which data was taken (seconds)\n", "times = [0, 600, 1200, 1800, 2400, 3000, 3600, 4200, 4800, 6000]; #Times in seconds" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#Butadiene concentration, moles per liter at each time above\n", "data = [0.31, 0.254, 0.208, 0.172, 0.141, 0.116, 0.0964, 0.0812, 0.0669, 0.0464]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#Plot the raw data versus time. Call the plot \"plot1\".\n", "pdata = list(zip(times,data))\n", "plt1 = scatter_plot(pdata)\n", "show(plt1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#Does not look 0th order. Is it first order? Try a logarithmic transformation of the data (as was done for H2O2)\n", "#or butadiene. See those notebooks." ] } ], "metadata": { "kernelspec": { "display_name": "SageMath 9.2", "language": "sage", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7" } }, "nbformat": 4, "nbformat_minor": 4 }