{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 2 Nuclear Sturcture and Radioactivity"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2_1 pgno:25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Half life of radioactive nuclide=t1/2=minutes 14.7674928978\n",
      "\n",
      "Time required for the activity to decrease to 25percent of the initial activity=t1=minutes 68.0335182976\n",
      "\n",
      "Time required for the activity to decrease to 10percent of the initial activity=t2=minutes 113.001227913\n"
     ]
    }
   ],
   "source": [
    "from math import log\n",
    "N0=3396.;#no. of counts per minute given by radioactive nuclide at a given time#\n",
    "N=1000.;#no. of counts per minute given by radioactive nuclide one hour later#\n",
    "thalf=0.693*60/(2.303*log(N0/N));#half life of nuclide in minutes#\n",
    "print'Half life of radioactive nuclide=t1/2=minutes',thalf\n",
    "t1=2.303*log(100/25)*thalf/0.693;#time required for the activity to decrease to 25% of the initial activity in minutes#\n",
    "print'\\nTime required for the activity to decrease to 25percent of the initial activity=t1=minutes',t1\n",
    "t2=2.303*log(100/10)*thalf/0.693;#time required for the activity to decrease to 10% of the initial activity in minutes#\n",
    "print'\\nTime required for the activity to decrease to 10percent of the initial activity=t2=minutes',t2\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2_2 pgno:27"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Half life of 226Ra molecule=t1/2=years 1584.62090409\n"
     ]
    }
   ],
   "source": [
    "R=3.7*10**10;#no. of alpha particles per second emitted by 1g of 226Ra#\n",
    "N=(6.023*10**23)/226;#no. of atoms of 226Ra#\n",
    "yr=3.15*10**7;#no of seconds in a year#\n",
    "thalf=0.693*N/(R*yr);#half life of 226Ra in years#\n",
    "print'Half life of 226Ra molecule=t1/2=years',thalf#here the answer written in textbook is wrongly printed actual answer will be the one we are getting here#\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2_3 pgno:29"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Weight of 1 Ci of 24Na=w=micrograms=1.13*10**-7grams 0.113352495089\n"
     ]
    }
   ],
   "source": [
    "thalf=14.8*60*60;#half life of 24Na atom in seconds#\n",
    "L=6.023*10**23;#Avagadro number#\n",
    "v=3.7*10**10;#1 Ci of radioactivity in disintegrations per second#\n",
    "w=(24*10**6*v*thalf)/(0.693*L);#weight of 1 Ci of 24Na in grams#\n",
    "print'Weight of 1 Ci of 24Na=w=micrograms=1.13*10**-7grams',w\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2_4 pgno:30"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dM value of H atom=dM=amu 0.00239\n",
      "\n",
      "Binding energy of H atom=BE=MeV 2.22509\n"
     ]
    }
   ],
   "source": [
    "Mp=1.00728;#mass of proton in amu#\n",
    "Mn=1.00866;#mass of neutronin amu#\n",
    "MH=2.01355;#isotopic mass of H atom in amu#\n",
    "dM=((1*Mp)+(1*Mn)-MH);#dM value of H atom in amu#\n",
    "print'dM value of H atom=dM=amu',dM\n",
    "BE=dM*931;#binding energy of H atom in MeV#\n",
    "print'\\nBinding energy of H atom=BE=MeV',BE\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2_5 pgno:32"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Age of the specimen=t=%fyears 36120.0499843\n"
     ]
    }
   ],
   "source": [
    "from math import log\n",
    "N0=15.3;#decay rate of Contemporary Carbon in disintegrations/min/gram#\n",
    "N=2.25;#decay rate of 14C specimen in disintegrtions/min/gram#\n",
    "thalf=5670.;#half life of nuclide in years#\n",
    "t=2.303*log(N0/N)*thalf/0.693;#Age of the specimen in years#\n",
    "print'Age of the specimen=t=years',t#here the answer given in textbook is actually wrong we get twice that of the answer which is shown through execution#\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2_6 pgno:33"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Here N0 and N must be in terms of Uranium.N is proportional to 1gram og Uranium\n",
      "\n",
      "N0 can be calculated from the given data.0.0453grams of 206Pb corresponds to 238*0.0453/206=0.0523grams of 238U,i.e 0.0453 grams of 206Pb must have been formed by the decaying of 0.523grams of 238U.\n",
      "Since N is proportional to 1,N0 is proportional to 1.0523.\n",
      "\n",
      "Age of the mineral=t=years=7.62*10**8years 762356478.526\n"
     ]
    }
   ],
   "source": [
    "from math import log\n",
    "thalf=4.5*10**9;#half life of Uranium in years#\n",
    "print'Here N0 and N must be in terms of Uranium.N is proportional to 1gram og Uranium'\n",
    "print'\\nN0 can be calculated from the given data.0.0453grams of 206Pb corresponds to 238*0.0453/206=0.0523grams of 238U,i.e 0.0453 grams of 206Pb must have been formed by the decaying of 0.523grams of 238U.\\nSince N is proportional to 1,N0 is proportional to 1.0523.'\n",
    "N0=1.0523;\n",
    "N=1;\n",
    "t=2.303*log(N0/N)*thalf/0.693;#Age of the mineral in years#\n",
    "print'\\nAge of the mineral=t=years=7.62*10**8years',t#here also the answer given in textbook is wrong the one resulted through execution is the right one#\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}