#importing modules
import math
from __future__ import division
from sympy import diff,Symbol
import numpy as np
#Variable declaration
n=1;
m=9;
a=Symbol('a')
b=Symbol('b')
r=Symbol('r')
#Calculation
y=(-a/(r**n))+(b/(r**m));
y=diff(y,r);
y=diff(y,r);
#Result
print y
#since the values of a,b,r are declared as symbols in the above cell, it cannot be solved there. hence it is being solved here with the given variable declaration
#importing modules
import math
from __future__ import division
#Variable declaration
a=7.68*10**-29;
r0=2.5*10**-10; #radius(m)
#Calculation
b=a*(r0**8)/9;
y=((-2*a*r0**8)+(90*b))/r0**11;
E=y/r0; #young's modulus(Pa)
#Result
print "young's modulus is",int(E/10**9),"GPa"
#importing modules
import math
from __future__ import division
#Variable declaration
dm=1.98*10**-29/3; #dipole moment
l=0.92*10**-10; #bond length(m)
#Calculation
ec=dm/l; #effective charge(coulomb)
#Result
print "effective charge is",round(ec*10**19,2),"*10**-19 coulomb"
print "answer given in the book is wrong"