spacetime-reference-frames-equations.ipynb

In [33]:
from sympy import symbols, Eq, sqrt
In [16]:
x1, x2, t1, t2, v, gamma = symbols('x_1, x_2, t_1, t_2, v, gamma')
c = symbols('c', constant = True)
In [17]:
eq1 = Eq(x2, (x1 - v * t1) * gamma)
eq1
Out[17]:
$\displaystyle x_{2} = \gamma \left(- t_{1} v + x_{1}\right)$
In [11]:
eq2 = Eq(x1, (x2 + v * t2)*gamma)
eq2
Out[11]:
$\displaystyle x_{1} = \gamma \left(t_{2} v + x_{2}\right)$
In [12]:
eq3 = Eq(x1 * x2, (x1 - v * t1) * gamma * (x2 + v * t2)*gamma)
eq3
Out[12]:
$\displaystyle x_{1} x_{2} = \gamma^{2} \left(- t_{1} v + x_{1}\right) \left(t_{2} v + x_{2}\right)$
In [13]:
eq4 = eq3.expand()
eq4
Out[13]:
$\displaystyle x_{1} x_{2} = - \gamma^{2} t_{1} t_{2} v^{2} - \gamma^{2} t_{1} v x_{2} + \gamma^{2} t_{2} v x_{1} + \gamma^{2} x_{1} x_{2}$
In [22]:
eq5 = Eq(t1, x1/c)
eq5
Out[22]:
$\displaystyle t_{1} = \frac{x_{1}}{c}$
In [23]:
eq6 = Eq(t2, x2/c)
eq6
Out[23]:
$\displaystyle t_{2} = \frac{x_{2}}{c}$
In [27]:
eq7 = eq4.subs({eq5.lhs : eq5.rhs, eq6.lhs : eq6.rhs})
eq7
Out[27]:
$\displaystyle x_{1} x_{2} = \gamma^{2} x_{1} x_{2} - \frac{\gamma^{2} v^{2} x_{1} x_{2}}{c^{2}}$
In [28]:
eq8 = Eq(gamma**2, c**2/(c**2-v**2))
eq8
Out[28]:
$\displaystyle \gamma^{2} = \frac{c^{2}}{c^{2} - v^{2}}$
In [30]:
eq9 = Eq(gamma**2, 1/(1-(c**2/v**2)))
eq9
Out[30]:
$\displaystyle \gamma^{2} = \frac{1}{- \frac{c^{2}}{v^{2}} + 1}$
In [35]:
eq10 = Eq(gamma, 1/sqrt(1-(c**2/v**2)))
eq10
Out[35]:
$\displaystyle \gamma = \frac{1}{\sqrt{- \frac{c^{2}}{v^{2}} + 1}}$
In [36]:
eq1
Out[36]:
$\displaystyle x_{2} = \gamma \left(- t_{1} v + x_{1}\right)$
In [41]:
eq11 = Eq(c*t2, gamma*(c*t1  - ( x1/c)*v))
eq11
Out[41]:
$\displaystyle c t_{2} = \gamma \left(c t_{1} - \frac{v x_{1}}{c}\right)$
In [43]:
eq12 = Eq(t2, gamma*(c*t1  - ( x1/c**2)*v))
eq12
Out[43]:
$\displaystyle t_{2} = \gamma \left(c t_{1} - \frac{v x_{1}}{c^{2}}\right)$
In [44]:
eq2
Out[44]:
$\displaystyle x_{1} = \gamma \left(t_{2} v + x_{2}\right)$
In [45]:
eq13 = Eq(c*t1, gamma*((x2/c)*v + c * t2))
eq13
Out[45]:
$\displaystyle c t_{1} = \gamma \left(c t_{2} + \frac{v x_{2}}{c}\right)$
In [48]:
eq14 = Eq(t1, gamma*((x2/c**2)*v + t2))
eq14
Out[48]:
$\displaystyle t_{1} = \gamma \left(t_{2} + \frac{v x_{2}}{c^{2}}\right)$
In [ ]:
 

Machine Learning

  1. Deal Banking Marketing Campaign Dataset With Machine Learning

TensorFlow

  1. Difference Between Scalar, Vector, Matrix and Tensor
  2. TensorFlow Deep Learning Model With IRIS Dataset
  3. Sequence to Sequence Learning With Neural Networks To Perform Number Addition
  4. Image Classification Model MobileNet V2 from TensorFlow Hub
  5. Step by Step Intent Recognition With BERT
  6. Sentiment Analysis for Hotel Reviews With NLTK and Keras
  7. Simple Sequence Prediction With LSTM
  8. Image Classification With ResNet50 Model
  9. Predict Amazon Inc Stock Price with Machine Learning
  10. Predict Diabetes With Machine Learning Algorithms
  11. TensorFlow Build Custom Convolutional Neural Network With MNIST Dataset
  12. Deal Banking Marketing Campaign Dataset With Machine Learning

PySpark

  1. How to Parallelize and Distribute Collection in PySpark
  2. Role of StringIndexer and Pipelines in PySpark ML Feature - Part 1
  3. Role of OneHotEncoder and Pipelines in PySpark ML Feature - Part 2
  4. Feature Transformer VectorAssembler in PySpark ML Feature - Part 3
  5. Logistic Regression in PySpark (ML Feature) with Breast Cancer Data Set

PyTorch

  1. Build the Neural Network with PyTorch
  2. Image Classification with PyTorch
  3. Twitter Sentiment Classification In PyTorch
  4. Training an Image Classifier in Pytorch

Natural Language Processing

  1. Spelling Correction Of The Text Data In Natural Language Processing
  2. Handling Text For Machine Learning
  3. Extracting Text From PDF File in Python Using PyPDF2
  4. How to Collect Data Using Twitter API V2 For Natural Language Processing
  5. Converting Text to Features in Natural Language Processing
  6. Extract A Noun Phrase For A Sentence In Natural Language Processing