#"momentums before collision"#
#"................................................................................................"#
#m_1=2kg#
#vec v_1=12m/s#
#vec P_1=m_1*v_1" (momentum before collision for the first object)"#
#vec P-1=2*12=24 kg*m/s#
#m_2=9kg#
#vec v_2=0#
#vec P_2=m_2*v_2"(momentum before collision for the second object)"#
#vec P_2=9.0#
#vec P_2=0#
#Sigma vec P_b=vec P_1+vec P_2"( total momentum before collision)"#
#Sigma vec P_b=24+0#
#Sigma vec P_b=24 kg*m/s#
#"momentums after collision"#
#"................................................................................................"#
#P_1^'=m_1*vec v_1^'" momentum after collision for the first object"#
#P_1^'=2*vec v_1^'#
#P_2^'=m_2*vec v_2^'" momentum after collision for the second object"#
#P_2^'=9*vec v_2^'#
#Sigma vec P_a=vec P_1^'+vec P_2^'#
#Sigma vec P_a=2*vec v_1^'+9*vec v_2^'" (total momentum after
collision)"#
#"conservation of momentum"#
#Sigma vec vec P_b=Sigma vec P_a#
#24=2*vec v_1^'+9*vec v_2^' " (1)"#
#Solution 1:#
#vec v_1+vec v_1^'=vec v_2+vec v_2^'#
#12+vec v_1^'=0+v_2^'#
#v_2^'=12+vec v_1^'#
#"using (1)"#
#24=2*vec v_1^'+9(12+vec v_1^')#
#24=2 vec v_1^'+108+9 vec v_1^'#
#24-108=11 vec v_1^'#
#-84=11v_1^'#
#vec v_1^'=-7.64 m/s#
#vec v_2^'=12+vec v_1^'#
#vec v_2^'=12-7.64#
#vec v_2^'=4.36 m/s#
#"solution -2:"#
#v_1^'=(2* vec P_b)/(m_1+m_2)- vec v_1#
#v_1^'=(2*24)/(2+9)-12" "vec v_1^'=48/11-12#
# v_1^'=-7.64 m/s#
#vec v_2^'=(2*vec P_b)/(m_1+m_2) - vec v_2#
#vec v_2^'=(2*24)/(2+9)-0#
#vec v_2^'=48/11#
#vec v_2^'=4.36 m/s#