## 27 July 2008

### 5th LUG@IITD Workshop

Hi, Firnds,,,, We are going to have a workshop for "Basics of Linux " on 31st of tis July,, 2008 @ IITD
.. Please register it here,, http://lug-iitd.org/5th_LUG%40IITD_Workshop_-_Basics_of_Linux_Usage

## 16 July 2008

### Deriving the equations in vectors

• All constant are taken in capital letters
• All variable are given in small letter

#### Deriving v(t) = Ui + A (t - Ti)

$\vec{a} = \frac{d \vec{v}}{dt} = \frac{d^2 \ \vec{s}}{dt^2}$

so

$\vec v (t) = \int _{T_i} ^t \vec a dt$

for zero or constant acceleration A we have

$\vec v (t) = \vec A \int _{T_i} ^t dt$
$\vec v (t) = \vec A \, [t] _{T_i} ^t$
$\vec v (t) = \vec A \, (t - {T_i}) + K$

we have one unknown K , we need to consider initial or final condition

• Lets take initially we have $\vec v (T_i) = \vec U_i$
$\vec U_i = \vec A \, ({T_i} - {T_i}) + K$

ie

$k= \vec U_i$
 $\vec v (t) = \vec U_i + \vec A \, (t - {T_i})$ eq ... (1)

If we take final condition in consideration then ie : $\vec v (T_f) = \vec V_f$

 $\vec v (t) = \vec V_f + \vec A \, ({T_f} -t )$ eq ... (2)

constant acceleration can be found using initial and final condition

 $\vec A = \frac { \vec V_f - \vec U_i }{ T_f - T_i}$ eq ... (3)

#### Deriving s(t) = Si + Ui(t-Ti) + (1/2)A (t - Ti)2

now we have

$\vec v (t) = \frac{d \vec{s}}{dt} = \vec U_i + \vec A \, (t - {T_i})$
$\vec{s}(t)= \int _{T_i} ^{t} \Big(\vec U_i + \vec A \, (t - {T_i}) \Big) {dt}$
$\vec{s}(t) = (\vec U_i - \vec A \, T_i ) \int _{T_i} ^{t} {dt} + \vec A \int _{T_i} ^{t} t \ {dt}$
$\vec{s}(t) = (\vec U_i - \vec A \, T_i ) \ \Big[t\Big] ^{t} _{T_i} + \vec A \Bigg[\frac { t^2} {2} \Bigg] _{T_i} ^{t} + K$

$\vec{s}(t) = (\vec U_i - \vec A \, T_i ) ( {t} - {T_i} ) + \frac {\vec A } {2 } (t^2-{T_i}^2) + K$

for eliminating K we need either final or initial condition ie $\vec{s}(T_i) = \vec S_i$

$\vec{S_i} = (\vec U_i - \vec A \, T_i ) ( {T_i} - {T_i} ) + \frac {\vec A } {2 } ({T_i}^2-{T_i}^2) + K$
$K= \vec{S_i}$
$\vec{s}(t) = \vec{S_i} + (\vec U_i - \vec A \, T_i ) ( {t} - {T_i} ) + \frac {\vec A } {2 } (t^2-{T_i}^2)$
$\vec{s}(t) = \vec{S_i} + \vec U_i ( {t} - {T_i} ) - \vec A ( {t}T_i - {T_i}^2 ) + \frac {\vec A } {2 } (t^2-{T_i}^2)$
$\vec{s}(t) = \vec{S_i} + \vec U_i ( {t} - {T_i} ) + \frac {\vec A } {2 } (t^2 - 2 {t}T_i + {T_i}^2)$
 $\vec{s}(t) = \vec{S_i} + \vec U_i ( {t} - {T_i} ) + \frac {\vec A } {2 } (t - T_i ) ^2$ eq ... (4)

If we would have taken final condition ie $\vec{s}(T_f) = \vec S_f$ then

 $\vec{s}(t) = \vec{S_f} + \vec V_f ( {T_f} - {t} ) - \frac {\vec A } {2 } (T_f - t ) ^2$ eq ... (5)

Taking t = Tf and putting eq (3) in eq (4) , we will get

$\vec{s}(T_f) = \vec{S_i} + \vec U_i ( {T_f} - {T_i} ) + \frac {\frac { \vec V_f - \vec U_i }{ T_f - T_i} } {2 } (T_f - T_i ) ^2$

Or

$\vec{S_f} = \vec{S_i} + \vec U_i ( {T_f} - {T_i} ) + \frac { { \vec V_f - \vec U_i } } {2 } (T_f - T_i )$
 $\vec{S_f} = \vec{S_i} + \frac { ( \vec V_f + \vec U_i ) (T_f - T_i ) } {2 }$ eq ... (6)

#### Deriving |v(t)|2 = |Ui|2 + 2 A . (s(t)-S_i)

$\vec v (t) = \vec U_i + \vec A \, (t - {T_i})$
$\vec v (t) . \vec v (t) = \big(\vec U_i + \vec A \, (t - {T_i}) \big).\big(\vec U_i + \vec A \, (t - {T_i}) \big)$
$\vec v (t) . \vec v (t) = \vec U_i . \vec U_i + \vec A . \vec A \ (t - T_i)^2 + 2 \vec A . \vec U_i (t- T_i)$
$\vec v (t) . \vec v (t) = \vec U_i . \vec U_i + \vec A . \vec A \ (t - T_i)^2 + 2 \vec A . \Bigg( \vec s(t) - \vec S_i - \frac {\vec A } {2 } (t - T_i ) ^2 \Bigg)$
$\vec v (t) . \vec v (t) = \vec U_i . \vec U_i + \vec A . \vec A \ (t - T_i)^2 + 2 \vec A . ( \vec s(t) - \vec S_i) - 2 \vec A . ( \frac {\vec A } {2 } (t - T_i ) ^2 )$

$\vec v (t) . \vec v (t) = \vec U_i . \vec U_i + 2 \vec A . ( \vec s(t) - \vec S_i)$

taking case for final velocity

 $\vec V_f . \vec V_f = \vec U_i . \vec U_i + 2 \vec A . ( \vec S_f - \vec S_i)$ eq ... (7)

or

 $\left | \vec V_f \right | ^ 2 = \left | \vec U_i \right | + 2 \vec A . ( \vec S_f - \vec S_i)$ eq ... (7)

## 15 July 2008

### Command line PNR Enquiry Script

Hi, I have developed a command line PNR Enquiry Script, though it is a small but useful and ofcourse my first perl script.

Dependency :
you need to have Perl on your system with commnad line browser w3m, inshort install w3m and perl bofore you download the script.
Note : you can view in lynx also, in case of lynx , replace w3m with lynx

Install It

$cd$ wget http://narendra.sisodiya.googlepages.com/pnrenq.pl
\$ chmod +x pnrenq.pl

How to use it

./pnrenq.pl 8322181194

The first argument is 10 digit PNR number

#######################################
# pnrenq - PNR Enquiry Script version 1 #
# Author - Narendra Sisodiya #
# Mail - narendra.sisodiya@gmail.com #
# (C) Narendra Sisodiya - 2008 #
# This Script is released under GPLv2 #
#######################################