'''
Created on 20-Jan-2022

@author: bthakur
'''

import inspect
import traceback
import random
import numpy as np
from sympy import (latex, Symbol, symbols,
                   )

from xv.util import toIntOrFloat, listAttr
from xv.km.storeddata import BaseStoredQuestions

class KinematicsStoredQuestions(BaseStoredQuestions):
    _QUESTION_KEYWORDS = None
    
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        pass
    
    def get_question_q1_1(self):
        keywords = [
            'kinematics',
            '1.1',
            ]
        
        prob_s = rf"""
        A motorboat going downstream overcame a raft at a point A; $\tau$ = 60 min later it turned back and after some time passed the raft at a distance $l$ = 6.0 km from the point A. Find the flow velocity assuming the duty of the engine to be constant
        """
        


        soln_s = rf"""
        1.1 Let $v_{{0}}$ be the stream velocity and $v^{{\prime}}$ the velocity of motorboat with respect to water. The motorboat reached point $B$ while going downstream with velocity $\left(v_{{0}}+v^{{\prime}}\right)$ and then returned with velocity $\left(v^{{\prime}}-v_{{0}}\right)$ and passed the raft at point $C$. Let $t$ be the time for the raft (which flows with stream with velocity $v_{{0}}$ ) to move from point $A$ to $C$, during which the motorboat moves from $A$ to $B$ and then from $B$ to $C$.
        Therefore
        $\displaystyle \frac{{l}}{{v_{{0}}}}=\tau+\frac{{\left(v_{{0}}+v^{{\prime}}\right) \tau-l}}{{\left(v^{{\prime}}-v_{{0}}\right)}}$
        On solving we get $\displaystyle v_{{0}}=\frac{{l}}{{2 \tau}}$
        """
                
        answer_s = rf"""
        $\displaystyle v_{{0}}=\frac{{l}}{{2 \tau}} = 3.0 $ km per hour
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass
    
    def get_question_q1_2(self):
        keywords = [
            'kinematics',
            '1.2',
            ]
        
        prob_s = rf"""
        1.2. A point traversed half the distance with a velocity $v_0$. The remaining part of the distance was covered with velocity $v_l$ for half the time, and with velocity $v_2$ for the other half of the time. Find the mean velocity of the point averaged over the whole time of motion.
        """
        

        soln_s = rf"""
        1.2 Let $s$ be the total distance traversed by the point and $t_{{1}}$ the time taken to cover half the distance. Further let $2 t$ be the time to cover the rest half of the distance.
        Therefore $\displaystyle \frac{{s}}{{2}}=v_{{0}} t_{{1}} \quad \text {{ or }} \quad t_{{1}}=\frac{{s}}{{2 v_{{0}}}}$ (1)
        and $\displaystyle\frac{{s}}{{2}}=\left(v_{{1}}+v_{{2}}\right) t \quad \text{{or}} \quad 2 t=\frac{{s}}{{v_{{1}}+v_{{2}}}}$ (2)
        Hence the sought average velocity
        $\displaystyle \langle v\rangle=\frac{{s}}{{t_{{1}}+2 t}}=\frac{{s}}{{\left[s / 2 v_{{0}}\right]+\left[s /\left(v_{{1}}+v_{{2}}\right)\right]}}=\frac{{2 v_{{0}}\left(v_{{1}}+v_{{2}}\right)}}{{v_{{1}}+v_{{2}}+2 v_{{0}}}}$
        """
                
        answer_s = rf"""
        $\displaystyle \langle v\rangle=2 v_{{0}}\left(v_{{1}}+v_{{2}}\right) /\left(2 v_{{0}}+v_{{1}}+v_{{2}}\right)$.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass
    
    def get_question_q1_3(self):
        keywords = [
            'kinematics',
            '1.3',
            ]
        
        prob_s = rf"""
        1.3. A car starts moving rectilinearly, first with acceleration $w= 5.0 \mathrm{{~m}} / \mathrm{{s}}^{{2}}$ (the initial velocity is equal to zero), then uniformly, and finally, decelerating at the same rate $w$, comes to a stop. The total time of motion equals $\tau=25 \mathrm{{~s}}$. The average velocity during that time is equal to $\langle v\rangle=72 \mathrm{{~km}}$ per hour. How long does the car move uniformly?
        """
        
        
        soln_s = rf"""
        $1.3$ As the car starts from rest and finally comes to a stop, and the rate of acceleration 
        and deceleration are equal, the distances as well as the times taken are same in these phases of motion.
        Let $\Delta t$ be the time for which the car moves uniformly. Then the acceleration / deceleration time 
        is $\displaystyle \frac{{\tau-\Delta t}}{{2}}$ each. 
        So, $\displaystyle \langle v\rangle \tau=2\left\{{\frac{{1}}{{2}} w \frac{{(\tau-\Delta t)^{{2}}}}{{4}}\right\}}+w \frac{{(\tau-\Delta t)}}{{2}} \Delta t$
        or $\displaystyle \Delta t^{{2}} = \tau^{{2}}-\frac{{4\langle v\rangle \tau}}{{w}}$
        Hence $\displaystyle \Delta t =\tau \sqrt{{1-\frac{{4\langle v\rangle}}{{w \tau}}}}=15 \mathrm{{~s}}$
        """
                
        answer_s = rf"""
        $\displaystyle \Delta t=\tau \sqrt{{1-4\langle v\rangle / w \tau}}=15 \mathrm{{~s}}$.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass
    
    def get_question_q1_4(self):
        keywords = [
            'kinematics',
            '1.4',
            ]
        
        prob_s = rf"""
        A point moves rectilinearly in one direction. Fig. 1.1 shows
        <img src="https://qphs.fs.quoracdn.net/main-qimg-a7725dea643006c2cf59ad87ddd48b48" />
        the distance s traversed by the point as a function of the time t.
        Using the plot find:
        (a) the average velocity of the point during the time of motion;
        (b) the maximum velocity;
        (c) the time moment to at which the instantaneous velocity is equal to the mean velocity averaged over the first to seconds. 
        """
        
        
        soln_s = rf"""
        $1.4$ (a) Sought average velocity
        $\displaystyle \langle v\rangle=\frac{{s}}{{t}}=\frac{{200 \mathrm{{~cm}}}}{{20 \mathrm{{~s}}}}=10 \mathrm{{~cm}} / \mathrm{{s}}$
        (b) For the maximum velocity, $\displaystyle \frac{{d s}}{{d t}}$ should be maximum. From the figure 
        $\displaystyle \frac{{d s}}{{d t}}$ is maximum for all points on the line ac, thus the sought maximum velocity becomes 
        average velocity for the line $a c$ and is equal to :
        $\displaystyle \frac{{b c}}{{a b}}=\frac{{100 \mathrm{{~cm}}}}{{4 \mathrm{{~s}}}}=25 \mathrm{{~cm}} / \mathrm{{s}}$

        (c) Time $t_{{0}}$ should be such that corresponding to it the slope $\displaystyle \frac{{d s}}{{d t}}$ should pass 
        through the point $O$ (origin), to satisfy the relationship $\displaystyle \frac{{d s}}{{d t}}=\frac{{s}}{{t_{{0}}}}$. 
        From figure the tangent at point $d$ passes through the origin and thus corresponding time $t=t_{{0}}=16 \mathrm{{~s}}$.
        """
                
        answer_s = rf"""
        (a) $10 \mathrm{{~cm}} / \mathrm{{s}}$
        (b) $25 \mathrm{{~cm}} / \mathrm{{s}}$
        (c) $t_{{0}}=16 \mathrm{{~s}}$.
        """

        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        pass

    def get_question_q1_5(self):
        keywords = [
            'kinematics',
            '1.5',
            ]
       
        prob_s = fr"""
        1.5. Two particles, 1 and 2, move with constant velocities $v_1$ and $v_2$. At the initial moment their radius vectors are equal to $r_1$ and $r_2$. How must these four vectors be interrelated for the particles to collide? 
        """
        
        
        soln_s = fr"""
        1.5 Let the particles collide at the point $A$ (Fig.), whose position vector is $\displaystyle \overrightarrow{{r_{{3}}}}$ (say). If $t$ be the time taken by each particle to reach at point $A$, from triangle law of vector addition :
        
        $\displaystyle \overrightarrow{{r_{{3}}}}=\overrightarrow{{r_{{1}}}}+\overrightarrow{{v_{{1}}}} t=\overrightarrow{{r_{{2}}}}+\overrightarrow{{v_{{2}}}} t$
        
        so, $\displaystyle \overrightarrow{{r_{{1}}}}-\overrightarrow{{r_{{2}}}}=\left(\overrightarrow{{v_{{2}}}}-\overrightarrow{{v_{{1}}}}\right) t$ (1)
        
        therefore, $\displaystyle t=\frac{{\left|\overrightarrow{{r_{{1}}}}-\overrightarrow{{r_{{2}}}}\right|}}{{\left|\overrightarrow{{v_{{2}}}}-\overrightarrow{{v_{{1}}}}\right|}}$ (2)
        
        From Eqs. (1) and (2) $\displaystyle \overrightarrow{{r_{{1}}}}=\overrightarrow{{r_{{2}}}}-\left(\overrightarrow{{v_{{2}}}}-\overrightarrow{{v_{{1}}}}\right) \frac{{\left|\overrightarrow{{r_{{1}}}}-\overrightarrow{{r_{{2}}}}\right|}}{{\left|\overrightarrow{{v_{{2}}}}-\overrightarrow{{v_{{1}}}}\right|}}$
        
        or, $\displaystyle \frac{{\overrightarrow{{r_{{1}}}}-\overrightarrow{{r_{{2}}}}}}{{\left|\overrightarrow{{r_{{1}}}}-\overrightarrow{{r_{{2}}}}\right|}}=\frac{{\overrightarrow{{v_{{2}}}}-\overrightarrow{{v_{{1}}}}}}{{\left|\overrightarrow{{v_{{2}}}}-\overrightarrow{{v_{{1}}}}\right|}}$, which is the sought relationship.
        """
        
        answer_s = f"""
        $\left(\mathbf{{r}}_{{1}}-\mathbf{{r}}_{{2}}\right) /\left|\mathbf{{r}}_{{1}}-\mathbf{{r}}_{{2}}\right|=\left(\mathbf{{v}}_{{2}}-\mathbf{{v}}_{{1}}\right) /\left|\mathbf{{v}}_{{2}}-\mathbf{{v}}_{{1}}\right|$.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        
    def get_question_q1_6(self):
        keywords = [
            'kinematics',
            '1.6',
            ]
       
        prob_s = fr"""
        1.6. A ship moves along the equator to the east with velocity $v_o$ = 30 km/hour. The southeastern wind blows at an angle $\varphi$ = $60^{{\circ}}$ to the equator with velocity v = 15 km/hour. Find the wind velocity $v'$ relative to the ship and the angle $\varphi'$ between the equator and the wind direction in the reference frame fixed to the ship. 
        """
        
        
        soln_s = fr"""
        1.6 We have $\displaystyle \vec{{v}}^{{\prime}}=\vec{{v}}-\overrightarrow{{v_{{0}}}}$ (1)
        From the vector diagram [of Eq. (1)] and using properties of triangle
        $\displaystyle v^{{\prime}}=\sqrt{{v_{{0}}^{{2}}+v^{{2}}+2 v_{{0}} v \cos \varphi}}=39.7 \mathrm{{~km}} / \mathrm{{hr}}$ (2)
        and $\displaystyle \frac{{v^{{\prime}}}}{{\sin (\pi-\varphi)}}=\frac{{v}}{{\sin \theta}} \quad$ or, $\sin \theta=\frac{{v \sin \varphi}}{{v^{{\prime}}}}$
        or $\displaystyle \theta=\sin ^{{-1}}\left(\frac{{v \sin \varphi}}{{v^{{\prime}}}}\right)$
        Using (2) and putting the values of $v$ and $d$
        $\theta=19.1^{{\circ}}$
        """
        
        answer_s = fr"""
        1.6. $v^{{\prime}}=\sqrt{{v_{{0}}^{{2}}+v^{{2}}+2 v_{{0}} v \cos \varphi}} \approx 40 \mathrm{{~km}}$ per hour, $\varphi^{{\prime}}=19^{{\circ}}$
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_7(self):
        keywords = [
            'kinematics',
            '1.7',
            ]
       
        prob_s = fr"""
        1.7. Two swimmers leave point A on one bank of the river to reach point B lying right across on the other bank. One of them crosses the river along the straight line AB while the other swims at right angles to the stream and then walks the distance that he has been carried away by the stream to get to point B. What was the velocity u of his walking if both swimmers reached the destination simultaneously? The stream velocity $v_0$ = 2.0 km/hour and the velocity $v'$ of each swimmer with respect to water equals 2.5 km per hour. 

        """
        
        
        soln_s = fr"""
        1.7 Let one of the swimmer (say 1 ) cross the river along $A B$, which is obviously the shortest path. Time taken to cross the river by the swimmer $1 .$ 
        $\displaystyle t_{{1}}=\frac{{d}}{{\sqrt{{v^{{\prime 2}}-v_{{0}}^{{2}}}}}}$, (where $A B=d$ is the width of the river) (1)
        For the other swimmer (say 2), which follows the quickest path, the time taken to cross the river.
        $\displaystyle t_{{2}} = \frac{{d}}{{v^{{\prime}}}}$ (2)
        In the time $t_{{2}}$, drifting of the swimmer 2 , becomes
        $\displaystyle x=v_{{0}} t_{{2}}=\frac{{v_{{0}}}}{{v^{{\prime}}}} d$, (using Eq. 2) (3)
        If $t_{{3}}$ be the time for swimmer 2 to walk the distance $x$ to come from $C$ to $B$ (Fig.), then
        $\displaystyle t_{{3}}=\frac{{x}}{{u}}=\frac{{v_{{0}} d}}{{v^{{\prime}} u}} \quad \text {{ (using Eq. 3) }}$ (4)
        According to the problem $t_{{1}}=t_{{2}}+t_{{3}}$
        or,$\displaystyle \frac{{d}}{{\sqrt{{v^{{\prime 2}}-v_{{0}}^{{2}}}}}}=\frac{{d}}{{v^{{\prime}}}}+\frac{{v_{{0}} d}}{{v^{{\prime}} u}}$
        On solving we get
        $\displaystyle u=\frac{{v_{{0}}}}{{\left(\frac{{1-v_{{0}}^{{2}}}}{{v^{{\prime 2}}}}\right)^{{-\frac{{1}}{{2}}}}-1}}=3 \mathrm{{~km}} / \mathrm{{hr}}$
        """
        
        answer_s = f"""
        $u=\frac{{v_{{0}}}}{{\left(1-v_{{0}}^{{2}} / v^{{\prime 2}}\right)^{{-1 / 2}}-1}}=3.0 \mathrm{{~km}}$ per hour.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_8(self):
        keywords = [
            'kinematics',
            '1.8',
            ]
       
        prob_s = fr"""
        1.8. Two boats, A and B, move away from a buoy anchored at the middle of a river along the mutually perpendicular straight lines: the boat A along the river, and the boat B across thg river. Having moved off an equal distance from the buoy the boats returned. Find the ratio of times of motion of boats $\tau_A / \tau_B$ if the velocity of each boat with respect to water is $\eta$ = 1.2 times greater than the stream velocity. 
        """
        
        
        soln_s = fr"""
        1.8 Let $l$ be the distance covered by the boat $A$ along the river as well as by the boat $B$ acr the river. Let $v_{{0}}$ be the stream velocity and $v^{{\prime}}$ the velocity of each boat with respect water. Therefore time taken by the boat $A$ in its journey
        $\displaystyle t_{{A}}=\frac{{l}}{{v^{{\prime}}+v_{{0}}}}+\frac{{l}}{{v^{{\prime}}-v_{{0}}}}$
        and for the boat $B$
        $\displaystyle t_{{B}}=\frac{{l}}{{\sqrt{{v^{{\prime 2}}-v_{{0}}^{{2}}}}}}+\frac{{l}}{{\sqrt{{v^{{\prime 2}}-v_{{0}}^{{2}}}}}}=\frac{{2 l}}{{\sqrt{{v^{{\prime 2}}-v_{{0}}^{{2}}}}}}$
        Hence, $\displaystyle \frac{{t_{{A}}}}{{t_{{B}}}}=\frac{{v^{{\prime}}}}{{\sqrt{{v^{{\prime 2}}-v_{{0}}^{{2}}}}}}=\frac{{\eta}}{{\sqrt{{\eta^{{2}}-1}}}}\left(\text {{ where }} \eta=\frac{{v^{{\prime}}}}{{v}}\right)$
        On substitution $\displaystyle \quad t_{{A}} / t_{{B}}=1.8$

        """
        
        answer_s = fr"""
        $\tau_{{A}} / \tau_{{B}}=\eta / \sqrt{{\eta^{{2}}-1}}=1.8$.
        """
        
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_9(self):
        keywords = [
            'kinematics',
            '1.9',

            ]
       
        prob_s = fr"""
        1.9. A boat moves relative to water with a velocity which is n = 2.0 times less than the river flow velocity. At what angle to the stream direction must the boat move to minimize drifting? 
        """
        
        
        soln_s = fr"""
        $1.9$ Let $v_{{0}}$ be the stream velocity and $v^{{\prime}}$ the velocity of boat with respect to water. $A$ $\displaystyle \frac{{v_{{0}}}}{{v^{{\prime}}}}=\eta=2>0$, some drifting of boat is inevitable. Let $\vec{{v}}$ make an angle $\theta$ with flow direction. (Fig.), then the time taken to cross the rive $t=\frac{{d}}{{v^{{\prime}} \sin \theta}}$ (where $d$ is the width of the river)
        In this time interval, the drifting of the boat $x=\left(v^{{\prime}} \cos \theta+v_{{0}}\right) t$
        $\displaystyle  =\left(v^{{\prime}} \cos \theta+v_{{0}}\right) \frac{{d}}{{v^{{\prime}} \sin \theta}}=(\cot \theta+\eta \operatorname{{cosec}} \theta) d$
        For $x_{{\min }}$ (minimum drifting)
        $\displaystyle \frac{{d}}{{d \theta}}(\cot \theta+\eta \operatorname{{cosec}} \theta)=0, \text {{ which yields }}$
        $\displaystyle \cos \theta =-\frac{{1}}{{\eta}}=-\frac{{1}}{{2}}$
        Hence, $\theta =120^{{\circ}}$
        """
        
        answer_s = fr"""
        $\theta=\arcsin (1 / n)+\pi / 2=120^{{\circ}}$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
        
    def get_question_q1_10(self):
        keywords = [
            'kinematics',
            '1.10',

            ]
       
        prob_s = fr"""
        1.10. Two bodies were thrown simultaneously from the same point: one, straight up, and the other, at an angle of $\theta = 60^{{\circ}}$ to the horizontal. The initial velocity of each body is equal to $v_0$ = 25 m/s. Neglecting the air drag, find the distance between the bodies t = 1.70 s later. 

        """
        
        
        soln_s = fr"""
        1.10 The solution of this problem becomes simple in the frame attached with one of the bodies. Let the body thrown straight up be 1 and the other body be 2 , then for the body 1 in the frame of 2 from the kinematic equation for constant acceleration :
        $\displaystyle \overrightarrow{{r_{{12}}}}=\overrightarrow{{r_{{0}}(12)}}+\overrightarrow{{v_{{0}}(12)}} t+\frac{{1}}{{2}} \vec{{w}}_{{12}} t^{{2}}$
        So, $\displaystyle \quad \overrightarrow{{r_{{12}}}}=\overrightarrow{{v_{{0(12)}}}} t, \left (\text{{because}} \quad  \vec{{w}}_{{12}}=0 \quad \text{{and}} \quad \overrightarrow{{r_{{0(12)}}}}=0\right)$
        or, $\displaystyle \left|\overrightarrow{{r_{{12}}}}\right|=\left|\overrightarrow{{v_{{0}}(12)}}\right| t$
        But $\displaystyle \left|\overrightarrow{{v_{{01}}}}\right|=\left|\overrightarrow{{v_{{02}}}}\right|=v_{{0}}$
        So, from properties of triangle
        $\displaystyle v_{{0(12)}}=\sqrt{{v_{{0}}^{{2}}+v_{{0}}^{{2}}-2 v_{{0}} v_{{0}} \cos \left(\pi / 2-\theta_{{0}}\right)}}$
        Hence, the sought distance $\displaystyle \left|\overrightarrow{{r_{{12}}}}\right|=v_{{0}} \sqrt{{2(1-\sin \theta)}} t=22 \mathrm{{~m}}$
        
        """
        
        answer_s = fr"""
        $l=v_{{0}} t V \overline{{2(1-\sin \theta)}}=22 \mathrm{{~m}}$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_11(self):
        keywords = [
            'kinematics',
            '1.11',

            ]
       
        prob_s = fr"""
		Two particles move in a uniform gravitational field with an acceleration g. At the initial moment the particles were located at one point and moved with velocities $v_{{1}}=3.0 \mathrm{{~m}} / \mathrm{{s}}$ and $v_{{2}}=4.0 \mathrm{{~m}} / \mathrm{{s}}$ horizontally in opposite directions. Find the distance between the particles at the moment when their velocity vectors become mutually perpendicular.

        """
        
        
        soln_s = fr"""
		Let the velocities of the paricles (say ${{\overrightarrow{{v_{{1}}}}}}^{{\prime}}$ and ${{\overrightarrow{{v_{{2}}}}}}^{{\prime}}$ ) becomes mutually perpendicuiar after time $t$. Then their velocitis become
		$\displaystyle \overrightarrow{{v_{{1}}^{{\prime}}}}=\overrightarrow{{v_{{1}}}}+\overrightarrow{{g t}} ; \quad \overrightarrow{{v_{{2}}^{{\prime}}}}=\overrightarrow{{v_{{2}}}}+\overrightarrow{{g t}}$
		
        As $\overrightarrow{{v_{{1}}}}^{{\prime}} \perp \overrightarrow{{v_{{2}}}}^{{\prime}}$ so, ${{\overrightarrow{{v_{{1}}}}}}^{{\prime}} \cdot \overrightarrow{{v_{{2}}}}^{{\prime}}=0$
		$\begin{{aligned}} \text {{ or, }} &\left(\overrightarrow{{v_{{1}}}}+\vec{{g}} t\right) \cdot\left(\overrightarrow{{v_{{2}}}}+\vec{{g}} t\right)=\\ \text {{ or }} &-v_{{1}} v_{{2}}+g^{{2}} t^{{2}}=0 \end{{aligned}}$
		Hence, $\displaystyle \quad t=\frac{{\sqrt{{v_{{1}} v_{{2}}}}}}{{g}}$
		Now form the Eq. $\displaystyle \quad \overrightarrow{{r_{{12}}}}=\vec{{r}}_{{0(12)}}+\vec{{v}}_{{0(12)}} t+\frac{{1}}{{2}} \vec{{w}}_{{12}} t^{{2}}$
		$\left|\overrightarrow{{r_{{12}}}}\right|=\left|\overrightarrow{{v_{{0(12)}}}}\right| t$, because here $\vec{{w}}_{{12}}=0$ and $\vec{{r}}_{{0(12)}}=0$ )
		Hence the sought distance
		$\displaystyle \left|\overrightarrow{{r_{{12}}}}\right|=\frac{{v_{{1}}+v_{{2}}}}{{g}} \sqrt{{v_{{1}} v_{{2}}}} \quad\left(\text {{ as }}\left|\vec{{v}}_{{0_{{(12)}}}}\right|=v_{{1}}+v_{{2}}\right)$


        """
        
        answer_s = fr"""
        $l=\left(v_{{1}}+v_{{2}}\right) \sqrt{{v_{{1}} v_{{2}}}} / g=2.5 \mathrm{{~m}}$.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_12(self):
        keywords = [
            'kinematics',
            '1.12',

            ]
       
        prob_s = fr"""
		Three points are located at the vertices of an equilateral triangle whose side equals $a$. They all start moving simultaneously with velocity $v$ constant in modulus, with the first point heading continually for the second, the second for the third, and the third for the first. How soon will the points converge?

        """
        
        
        soln_s = fr"""
		From the symmetry of the problem all the three points are always located at the vertices of equilateral triangles of varying side length and finally meet at the centriod of the initial equilateral triangle whose side length is $a$, in the sought time interval (say $t$ ).
		Let us consider an arbitrary equilateral triangie
		of edge length $l$ (say).
		Then the rate by which 1 approaches 2, 2 approches 3, and 3 approches 1, becomes :
		$\displaystyle \frac{{-d l}}{{d t}}=v-v \cos \left(\frac{{2 \pi}}{{3}}\right)$

		On integrating : $\begin{{gathered}} -\int_{{a}}^{{0}} d l=\frac{{3 v}}{{2}} \int_{{0}}^{{t}} d t \\ a=\frac{{3}}{{2}} v t \text {{ so }} t=\frac{{2 a}}{{3 v}} \end{{gathered}}$        
        
        """
        
        answer_s = fr"""
        $t=2 a / 3 v$
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_13(self):
        keywords = [
            'kinematics',
            '1.13',

            ]
       
        prob_s = fr"""
		1.13. Point $A$ moves uniformly with velocity $v$ so that the vector $\mathbf{{v}}$ is continually "aimed" at point $B$ which in its turn moves rectilinearly and uniformly with velocity $u < v$. At the initial moment of time $\mathbf{{v}} \perp \mathbf{{u}}$ and the points are separated by a distance $l$. How soon will the points converge?
        
        """
        
        
        soln_s = fr"""
        		
		1.13 Let us locate the points $A$ and $B$ at an arbitrary instant of time
		If $A$ and $B$ are separated by the distance $s$ at this moment, then the points converge or point $A$ approaches $B$ with velocity $\displaystyle \frac{{-d s}}{{d t}}=v-u \cos \alpha$ where angle $\alpha$ varies with time.
		On intergating, 
        $\displaystyle \quad-\int_{{l}}^{{0}} d s=\int_{{0}}^{{T}}(v-u \cos \alpha) d t$ 
        (where $T$ is the sought time.) 
        or $\displaystyle \quad l=\int_{{0}}^{{T}}(v-u \cos \alpha) d t \quad (1)$
		As both $A$ and $B$ cover the same distance in $x$-direction during the sought time interval, so the other condition which is required, can be obtained by the equation
		So,
		$\begin{{gathered}} \Delta x=\int v_{{x}} d t \\ u T=\int_{{0}}^{{T}} v \cos \alpha d t \quad (2)\end{{gathered}}$
		Solving (1) and (2), we get $\displaystyle T=\frac{{u l}}{{v^{{2}}-u^{{2}}}}$
		One can see that if $u=v$, or $u < v$, point $A$ cannot catch $B$.

        """
        
        answer_s = fr"""
        1.13. It is seen from Fig. $1 a$ that the points $A$ and $B$ converge with velocity $v-u \cos \alpha$, where the angle $\alpha$ varies with time. The
		points merge provided the following two conditions are met:
		$\displaystyle \int_{{0}}^{{\tau}}(v-u \cos \alpha) d t=l, \quad \int_{{0}}^{{\tau}} v \cos \alpha d t=u \tau,$
		where $\tau$ is the sought time. It follows from these two equations that.
		$\displaystyle \tau=v l /\left(v^{{2}}-u^{{2}}\right)$

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_14(self):
        keywords = [
            'kinematics',
            '1.14',

            ]
       
        prob_s = fr"""
		A train of length $l=350 \mathrm{{~m}}$ starts moving rectilinearly with constant acceleration $w=3.0 \cdot 10^{{-2}} \mathrm{{~m}} / \mathrm{{s}}^{{2}} ; \hspace t=30 \mathrm{{~s}}$ after the start the locomotive headlight is switched on (event 1), and $\tau=60 \mathrm{{~s}}$ after that event the tail signal light is switched on (event 2 ). Find the distance between these events in the reference frames fixed to the train and to the Earth. How and at what constant velocity $V$ relative to the Earth must a certain reference frame $K$ move for the two events to occur in it at the same point?

        """
        
        
        soln_s = fr"""
        In the reference frame fixed to the train, the distance between the two events is obviously equal to $l$. Suppose the train starts moving at time $t=0$ in the positive $x$ direction and take the origin $(x=0)$ at the head-light of the train at $t=0$. Then the coordinate of first event in the earth's frame is
		$\displaystyle x_{{1}}=\frac{{1}}{{2}} w t^{{2}}$
		and similarly the coordinate of the second event is
		$\displaystyle x_{{2}}=\frac{{1}}{{2}} w(t+\tau)^{{2}}-l$
		The distance between the two events is obviously.
		$\displaystyle x_{{1}}-x_{{2}}=l-w \tau(t+\tau / 2)=0.242 \mathrm{{~km}}$
		in the reference frame fixed on the earth..
		For the two events to occur at the same point in the reference frame $K$, moving with constant velocity $V$ relative to the earth, the distance travelled by the frame in the time interval $T$ must be equal to the above distance.
		Thus
		$\displaystyle V \tau=l-w \tau(t+\tau / 2)$
		So,
		$\displaystyle V=\frac{{l}}{{\tau}}-w(t+\tau / 2)=4.03 \mathrm{{~m}} / \mathrm{{s}}$
		The frame $K$ must clearly be moving in a direction opposite to the train so that if (for example) the origin of the frame coincides with the point $x_{{1}}$ on the earth at time $t$, it coincides with the point $x_{{2}}$ at time $t+\tau$.

        """
        
        answer_s = fr"""
        $x_{{1}}-x_{{2}}=l-w \tau(t+\tau / 2)=0.24 \mathrm{{~km}}$. Toward the train with velocity $V=4.0 \mathrm{{~m}} / \mathrm{{s}}$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_15(self):
        keywords = [
            'kinematics',
            '1.15',
            ]
       
        prob_s = fr"""
		An elevator car whose floor-to-ceiling distance is equal to $2.7 \mathrm{{~m}}$ starts ascending with constant acceleration $1.2 \mathrm{{~m}} / \mathrm{{s}}^{{2}} ;$ $2.0 \mathrm{{~s}}$ after the start a bolt begins falling from the ceiling of the car. Find:
		(a) the bolt's free fall time;
		(b) the displacement and the distance covered by the bolt during the free fall in the reference frame fixed to the elevator shaft.

        """
        
        
        soln_s = fr"""
        (a) One good way to solve the problem is to work in the elevator's frame having the observer at its bottom 
		
		Let us denote the separation between floor and celing by $h=2.7 \mathrm{{~m}}$. and the acceleration of the elevator by $w=1.2 \mathrm{{~m}} / \mathrm{{s}}^{{2}}$
		From the kinematical formula
		$y=y_{{0}}+v_{{0 y}} t+\frac{{1}}{{2}} w_{{y}} t^{{2}}$
		Here $y=0, y_{{0}}=+h, v_{{0 y}}=0$
		and $\quad w_{{y}}=w_{{\text {{bolt }}(y)}}-w_{{\text {{ele }}(y)}}$
		$=(-g)-(w)=-(g+w)$
		So, $\quad 0=h+\frac{{1}}{{2}}\{{-(g+w)\}} t^{{2}}$
		or, $t=\sqrt{{\frac{{2 h}}{{g+w}}}}=0.7 \mathrm{{~s}}$.
		
		(b) At the moment the bolt loses contact with the elevator, it has already aquired the velocity equal to elevator given by :
		$\displaystyle v_{{0}}=(1.2)(2)=2.4 \mathrm{{~m}} / \mathrm{{s}}$
		In the reference frame attached with the elevator shaft (ground) and pointing the $y$-axis upward, we have for   (ground) and pointing the $y$-axis upward, we have for the displacement of the bolt,
		$\displaystyle \Delta y=v_{{0 y}} t+\frac{{1}}{{2}} w_{{y}} t^{{2}}$
		$\displaystyle =v_{{0}} t+\frac{{1}}{{2}}(-g) t^{{2}}$
		or,
		$\displaystyle \Delta y=(2.4)(0.7)+\frac{{1}}{{2}}(-9.8)(0.7)^{{2}}=-0.7 \mathrm{{~m}}$
		Hence the bolt comes down or displaces downward relative to the point, when it loses contact with the elevator by the amount $0.7 \mathrm{{~m}}$ 
		Obviously the total distance covered by the bolt during its free fall time
		$\displaystyle s=|\Delta y|+2\left(\frac{{v_{{0}}^{{2}}}}{{2 g}}\right)=0.7 \mathrm{{~m}}+\frac{{(2 \cdot 4)^{{2}}}}{{(9 \cdot 8)}} \mathrm{{m}}=1.3 \mathrm{{~m}}$

        """
        
        answer_s = fr"""
        (a) $0.7 \mathrm{{~s}}$; (b) $0.7$ and $1.3 \mathrm{{~m}}$ respectively.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_15_vector(self):
        keywords = [
            'kinematics',
            '1.15',
            '1.15_vector',
            ]
       
        prob_s = fr"""
		An elevator car whose dimension is a = a_1 i+ a2 j +a_3 k starts ascending with constant acceleration w = w1 i + w2 j + w3 k; after t seconds the start a bolt begins falling from the center of the ceiling of the car. Find:
		(a) the bolt's free fall time;
		(b) the displacement and the distance covered by the bolt during the free fall in the reference frame fixed to the elevator shaft.

        """
        
        
        soln_s = fr"""
        (a) One good way to solve the problem is to work in the elevator's frame having the observer at its bottom 
		
        $\overrightarrow{{r}} - \overrightarrow{{r_{{0}}}} = + \overrightarrow{{v_{{0}}}} t+\frac{{1}}{{2}} \overrightarrow{{w_{{r}}}} t^{{2}}$
		
        Here 
        $\overrightarrow{{r_{{0}}}} = a_1 /2 i + a_2 /2 j + a3 k$ 
        $\overrightarrow{{r}} = $
        $\overrightarrow{{v_{{0}}}}=0$
		
        and $\quad \overrightarrow{{w_{{r}}}} = \overrightarrow{{w_{{\text {{bolt }}(r)}}}}-\overrightarrow{{w_{{\text {{ele }}(r)}}}}$
		
        $=(-\overrightarrow{{g}})-(\overrightarrow{{w}})=-(\overrightarrow{{g}}+\overrightarrow{{w}})$
		
        So, $\quad 0=h+\frac{{1}}{{2}}\{{-(\overrightarrow{{g}}+\overrightarrow{{w}})\}} t^{{2}}$
		
        or, $t=\sqrt{{\frac{{2 h}}{{\overrightarrow{{g}}+\overrightarrow{{w}}}}}}=0.7 \mathrm{{~s}}$.
		
		(b) At the moment the bolt loses contact with the elevator, it has already aquired the velocity equal to elevator given by :
		
        $\displaystyle \overrightarrow{{v_{{0}}}}=(1.2)(2)=2.4 \mathrm{{~m}} / \mathrm{{s}}$
		
        In the reference frame attached with the elevator shaft (ground) and pointing the $r$-axis upward, we have for   (ground) and pointing the $r$-axis upward, we have for the displacement of the bolt,
		
        $\displaystyle \Delta \overrightarrow{{r}} = \overrightarrow{{v_{{0}}}} t+\frac{{1}}{{2}} \overrightarrow{{w_{{r}}}} t^{{2}}$
		
        $\displaystyle =\overrightarrow{{v_{{0}}}} t+\frac{{1}}{{2}}(-\overrightarrow{{g}}) t^{{2}}$
		
        or,
		$\displaystyle \Delta \overrightarrow{{r}}=(2.4)(0.7)+\frac{{1}}{{2}}(-9.8)(0.7)^{{2}}=-0.7 \mathrm{{~m}}$
		
        Hence the bolt comes down or displaces downward relative to the point, when it loses contact with the elevator by the amount $0.7 \mathrm{{~m}}$ 
		
        Obviously the total distance covered by the bolt during its free fall time
		
        $\displaystyle s=|\Delta \overrightarrow{{r}}|+2\left(\frac{{\overrightarrow{{v_{{0}}}}^{{2}}}}{{2 \overrightarrow{{g}}}}\right)=0.7 \mathrm{{~m}}+\frac{{(2.4)^{{2}}}}{{(9.8)}} \mathrm{{m}}=1.3 \mathrm{{~m}}$

        """
        
        answer_s = fr"""
        (a) $0.7 \mathrm{{~s}}$; (b) $0.7$ and $1.3 \mathrm{{~m}}$ respectively.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_16(self):
        keywords = [
            'kinematics',
            '1.16',
            ]
       
        prob_s = fr"""
		Two particles, 1 and 2 , move with constant velocities $v_1$ and $v_2$ along two mutually perpendicular straight lines toward the intersection point $O$. At the moment $t=0$ the particles were located at the distances $l_1$ and $l_2$ from the point $O$. How soon will the distance between the particles become the smallest? What is it equal to?

        """
        
        
        soln_s = fr"""
        Let the particle 1 and 2 be at points $B$ and $A$ at $t=0$ at the distances $l_1$ and $l_2$ from intersection point $O$.
        Let us fix the inertial frame with the particle 2 . Now the particle 1 moves in relative to this reference frame with a relative velocity $\overrightarrow{{v_{{12}}}}=\overrightarrow{{v_1}}-\overrightarrow{{v_2}}$ and its trajectory is the straight line $B P$. Obviously, the minimum distance between the particles is equal to the length of the perpendicular $A P$ dropped from point $A$ on to the straight line $B P$.

        From Fig. (b), $\quad v_{{12}}=\sqrt{{v_1^2+v_2^2}}$, and $\tan \theta=\frac{{v_1}}{{v_2}}\quad (1)$
        The shortest distance
        $A P=A M \sin \theta=(O A-O M) \sin \theta=\left(l_2-l_1 \cot \theta\right) \sin \theta$
        or $\quad A P=\left(l_2-l_1 \frac{{v_2}}{{v_1}}\right) \frac{{v_1}}{{\sqrt{{v_1^2+v_2^2}}}}=\frac{{v_1 l_2-v_2 l_1}}{{\sqrt{{v_1^2+v_2^2}}}} \quad$ (using 1)
        The sought time can be obtained directly from the condition that $\left(l_1-v_1 t\right)^2+\left(l_2-v_2 t\right)^2$ is minimum. This gives $t=\frac{{l_1 v_1+l_2 v_2}}{{v_1^2+v_2^2}}$.

        """
        
        answer_s = fr"""
        $t_m=\frac{{v_1 l_1+v_2 l_2}}{{v_1^2+v_2^2}}, \quad l_{{\min }}=\frac{{\left|l_1 v_2-l_2 v_1\right|}}{{\sqrt{{v_1^2+v_2^2}}}}$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_17(self):
        keywords = [
            'kinematics',
            '1.17',
            ]
       
        prob_s = fr"""
		From point $A$ located on a highway (Fig. 1.2) one has to get by car as soon as possible to point $B$ located in the field at a distance $l$ from the highway. It is known that the car moves in the field $\eta$ times slower than on the highway. At what distance from point $D$ one must turn off the highway?

        """
        
        
        soln_s = fr"""
        Let the car turn off the highway at a distance $x$ from the point $D$.
        So, $C D=x$, and if the speed of the car in the field is $v$, then the time taken by the car to cover the distance $A C=A D-x$ on the highway
        $t_1=\frac{{A D-x}}{{\eta v}}$
        and the time taken to travel the distance $C B$ in the field
        $t_2=\frac{{\sqrt{{l^2+x^2}}}}{{v}}$
        So, the total time elapsed to move the car from point $A$ to $B$
        $t=t_1+t_2=\frac{{A D-x}}{{\eta v}}+\frac{{\sqrt{{l^2+x^2}}}}{{v}}$
        For $t$ to be minimum
        $\frac{{d t}}{{d x}}=0 \text {{ or }} \frac{{1}}{{v}}\left[-\frac{{1}}{{\eta}}+\frac{{x}}{{\sqrt{{l^2+x^2}}}}\right]=0$
        or
        $\eta^2 x^2=l^2+x^2 \quad \text {{ or }} x=\frac{{l}}{{\sqrt{{\eta^2-1}}}}$

        """
        
        answer_s = fr"""
        $C D=l / \sqrt{{\eta^2-1}}$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_18(self):
        keywords = [
            'kinematics',
            '1.18',
            ]
       
        prob_s = fr"""
		A point travels along the $x$ axis with a velocity whose projection $v_x$ is presented as a function of time by the plot in Fig. 1.3.
        <img src="https://cdn1.byjus.com/wp-content/uploads/2021/07/I.E.-Irodov-Solutions-on-Kinematics-161.png"/>
        Assuming the coordinate of the point $x=0$ at the moment $t=0$, draw the approximate time dependence plots for the acceleration $w_x$, the $x$ coordinate, and the distance covered $s$.

        """
        
        
        soln_s = fr"""
        To plot $x(t), s(t)$ and $w_x(t)$ let us partion the given plot $v_x(t)$ into five segments (for detailed analysis) as shown in the figure.
        For the part $o a: w_x=1$ and $v_x=t=v$
        Thus, $\Delta x_1(t)=\int_x d t=\int_0^t d t=\frac{{t^2}}{{2}}=s_1(t)$ Putting $t=1$, we get, $\Delta x_1=s=\frac{{1}}{{2}}$ unit
        For the part ab :
        $w_x=\mathrm{{O}}$ and $v_x=v=$ constant $=1$
        Thus $\Delta x_2(t)=\int v_x d t=\int_1^t d t=(t-1)=s_2(t)$
        Putting $t=3, \Delta x_2=s_2=2$ unit
        For the part $b 4: w_x=1$ and $\left.v_x=1-(t-3)=4-t\right)=v$
        Thus $\Delta x_3(t)=\int_3^t(4-t) d t=4 t-\frac{{t^2}}{{2}}-\frac{{15}}{{2}}=s_3(t)$
        Putting $t=4, \Delta x_3=x_3=\frac{{1}}{{2}} u n i t$
        For the part 4d: $\quad v_x=-1$ and $v_x=-(1-4)=4-1$
        So, $\quad v=\left|v_x\right|=t-4$ for $t>4$
        Thus $\Delta x_4(t)=\int_4^t(1-t) d t=4 t-\frac{{t^2}}{{2}}-8$
        Putting $t=6, \Delta x_4=-1$
        Similarly $\quad s_4(t)=\int\left|v_x\right| d t=\int_4^t(t-4) d t=\frac{{t^2}}{{2}}-4 t+8$
        Putting $t=6, s_4=2$ unit
        For the part $d 7: \quad w_x=2$ and $v_x=-2+2(t-6)=2(t-7)$
        $v=\left|v_x\right|=2(7-t)$ for $t \leftarrow 7$
        Now, $\quad \Delta x(t)=\int_t^6 2(t-7) d t=t^2-14 t+48$
        Putting $\quad t=4, \Delta x_5=-1$
        Similarly $\quad s_5(t)=\int_t^6 2(7-t) d t=14 t-t^2-48$
        Putting  $\quad t=7, s_5=1$
        On the basis of these obtained expressions $w_x(t), x(t)$ and $s(t)$ plots can be easily plotted as shown in the figure of answersheet.

        """
        
        answer_s = fr"""
        
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_19(self):
        keywords = [
            'kinematics',
            '1.19',
            ]
       
        prob_s = fr"""
		A point traversed half a circle of radius $R=160 \mathrm{{~cm}}$ during time interval $\tau=10.0 \mathrm{{~s}}$. Calculate the following quantities averaged over that time:
        (a) the mean velocity $\langle v\rangle$;
        (b) the modulus of the mean velocity vector $|\langle\mathbf{{v}}\rangle|$;
        (c) the modulus of the mean vector of the total acceleration $|\langle\mathbf{{w}}\rangle|$ if the point moved with constant tangent acceleration.

        """
        
        
        soln_s = fr"""
        (a) Mean velocity 
        $\begin{{aligned}}\langle\nu\rangle &=\frac{{\text {{ Total distance covered }}}}{{\text {{ Time elapsed }}}} \\ &=\frac{{s}}{{t}}=\frac{{\pi R}}{{\tau}}=50 \mathrm{{~cm}} / \mathrm{{s}} \end{{aligned}}$
        (b) Modulus of mean velocity vector 
        $|\langle \vec{{v}}\rangle \mid=\frac{{|\Delta \vec{{r}}|}}{{\Delta t}}=\frac{{2 R}}{{\tau}}=32 \mathrm{{~cm}} / \mathrm{{s}} \quad$ (2)
        (c) Let the point moves from $i$ to $f$ along the half circle and $v_0$ and $v$ be the spe at the points respectively.
        We have $\quad \frac{{d v}}{{d t}}=w_t$
        or, $\quad v=v_0+w_t t$ (as $w_t$ is constant, according to the problem)
        $\langle v\rangle=\frac{{\int_0^t\left(v_0+w_t t\right) d t}}{{\int_0^t d t}}=\frac{{v_0+\left(v_0+w_t t\right)}}{{2}}=\frac{{v_0+v}}{{2}} \quad$ (3)
        So, from (1) and (3)
        $\frac{{v_0+v}}{{2}}=\frac{{\pi R}}{{\tau}} \quad$ (4)
        Now the modulus of the mean vector of total acceleration
        $|\langle\vec{{w}}\rangle|=\frac{{|\Delta \vec{{v}}|}}{{\Delta t}}=\frac{{\left|\vec{{v}}-\overrightarrow{{v_0}}\right|}}{{\tau}}=\frac{{v_0+v}}{{\tau}} \quad$ (5)
        Using (4) in (5), we get :
        $|\langle\vec{{w}}\rangle|=\frac{{2 \pi R}}{{\tau^2}}$


        """
        
        answer_s = fr"""
        (a) $\langle v\rangle=\pi R / \tau=50 \mathrm{{~cm}} / \mathrm{{s}}$;
        (b) $|\langle\mathbf{{v}}\rangle|=2 R / \tau=32 \mathrm{{~cm}} / \mathrm{{s}}$;
        (c) $|\langle\mathbf{{w}}\rangle|=2 \pi R / \tau^2=10 \mathrm{{~cm}} / \mathrm{{s}}^2$.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_20(self):
        keywords = [
            'kinematics',
            '1.20',
            ]
       
        prob_s = fr"""
		A radius vector of a particle varies with time $t$ as $\mathbf{{r}}=$ $=a t(1-\alpha t)$, where a is a constant vector and $\alpha$ is a positive factor. Find:
        (a) the velocity $\mathbf{{v}}$ and the acceleration $w$ of the particle as functions of time;
        (b) the time interval $\Delta t$ taken by the particle to return to the initial points, and the distance $s$ covered during that time.
        """
        
        
        soln_s = fr"""
        (a) we have $\vec{{r}}=\overrightarrow{{a t}}(1-\alpha t)$
        So $\vec{{v}}=\frac{{d \vec{{r}}}}{{d t}}=\vec{{a}}(1-2 \alpha t)$
        and $\vec{{w}}=\frac{{d \vec{{v}}}}{{d t}}=-2 \alpha \vec{{a}}$
        (b) From the equation
        $\begin{{gathered}} \vec{{r}}=\overrightarrow{{a t}}(1-\alpha t), \\ \vec{{r}}=0, \text {{ at }} t=0 \text {{ and also at }} t=\Delta t=\frac{{1}}{{\alpha}} \end{{gathered}}$
        So, the sought time $\Delta t=\frac{{1}}{{\alpha}}$
        As
        $\vec{{v}}=\vec{{a}}(1-2 \alpha t)$
        So,
        $\left.v=|\vec{{v}}|=\begin{{array}}{{l}} a(1-2 \alpha t) \\ a(2 \alpha t-1) \end{{array}}\right\}} \begin{{array}}{{l}} \text{{ for }} \leq \frac{{1}}{{2\alpha}} \\ \text{{ for }} > \frac{{1}}{{2\alpha}} \end{{array}}$
        Hence, the sought distance
        $s=\int v d t=\int_0^{{1 / 2 \alpha}} a(1-2 \alpha t) d t+\int_{{1 / 2 \alpha}}^{{1 / \alpha}} a(2 \alpha t-1) d t$
        Simplifying, we get, $s=\frac{{a}}{{2 \alpha}}$

        """
        
        answer_s = fr"""
        (a) $\mathbf{{v}}=\mathbf{{a}}(1-2 \alpha t), \quad \mathbf{{w}}=-2 \alpha \mathbf{{a}}=\mathrm{{const}} ;$ 
        (b) $\Delta t=1 / \alpha$, $s=a / 2 \alpha$

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_21(self):
        keywords = [
            'kinematics',
            '1.21',
            ]
       
        prob_s = fr"""
		At the moment $t=0$ a particle leaves the origin and moves in the positive direction of the $x$ axis. Its velocity varies with time as $\mathbf{{v}}=\mathbf{{v}}_0(1-t / \tau)$, where $\mathbf{{v}}_0$ is the initial velocity vector whose modulus equals $v_0=10.0 \mathrm{{~cm}} / \mathrm{{s}} ; \tau=5.0 \mathrm{{~s}}$. Find:
        (a) the $x$ coordinate of the particle at the moments of time $6.0$, 10 , and $20 \mathrm{{~s}}$
        (b) the moments of time when the particle is at the distance $10.0 \mathrm{{~cm}}$ from the origin;
        (c) the distance $s$ covered by the particle during the first $4.0$ and $8.0 \mathrm{{~s}}$; draw the approximate plot $s(t)$.
        """
        
        
        soln_s = fr"""
        (a) As the particle leaves the origin at $t=0$
        So, $\quad \Delta x=x=\int v_x d t \quad$ (1)
        As $\quad \vec{{v}}=\overrightarrow{{v_0}}\left(1-\frac{{t}}{{\tau}}\right)\quad$ (2)
        where $\vec{{v}}_0$ is directed towards the +ve $x$-axis
        So, $\quad v_x=v_0\left(1-\frac{{t}}{{\tau}}\right)$
        From (1) and (2),
        $x=\int_0^t v_0\left(1-\frac{{t}}{{\tau}}\right) d t=v_0 t\left(1-\frac{{t}}{{2 \tau}}\right)\quad$ (3)
        Hence $x$ coordinate of the particle at $t=6 \mathrm{{~s}}$.
        $x=10 \times 6\left(1-\frac{{6}}{{2 \times 5}}\right)=24 \mathrm{{~cm}}=0.24 \mathrm{{~m}}$
        Similarly at
        $x=10 \times 10\left(1-\frac{{10}}{{2 \times 5}}\right)=0$
        and at
        $x=10 \times 20\left(1-\frac{{20}}{{2 \times 5}}\right)=-200 \mathrm{{~cm}}=-2 \mathrm{{~m}}$
        (b) At the moments the particle is at a distance of $10 \mathrm{{~cm}}$ from the origin, $x=\pm 10 \mathrm{{~cm}}$. Putting
        $x=+10 \text {{ in Eq. (3) }}$
        $\begin{{gathered}} 10=10 t\left(1-\frac{{t}}{{10}}\right) \text {{ or, }} t^2-10 t+10=0, \\ t=t=\frac{{10 \pm \sqrt{{100-40}}}}{{2}}=5 \pm \sqrt{{15}} \mathrm{{~s}} \end{{gathered}}$
        So,
        Now putting
        $x=-10 \text {{ in Eqn (3) }}$
        $-10=10\left(1-\frac{{t}}{{10}}\right)$
        On solving,
        $t=5 \pm \sqrt{{35}} \mathrm{{~s}}$
        As $t$ cannot be negative, so,
        $t=(5+\sqrt{{35}}) \mathrm{{s}}$
        Hence the particle is at a distance of $10 \mathrm{{~cm}}$ from the origin at three moments of time :
        $t=5 \pm \sqrt{{15}} \quad \mathrm{{~s}}, 5+\sqrt{{35}} \mathrm{{~s}}$
        (c) We have $\quad \vec{{v}}=\overrightarrow{{v_0}}\left(1-\frac{{t}}{{\tau}}\right)$
        So, $\left.\quad v=|\vec{{v}}|=\begin{{array}}{{r}}v_0\left(1-\frac{{t}}{{\tau}}\right) \\ v_0\left(\frac{{t}}{{\tau}}-1\right)\end{{array}}\right\}} \begin{{array}}{{r}}\text {{ for }} t \leq \tau \\ \text {{ for }} t>\tau\end{{array}}$
        So $\quad s=\int_0^t v_0\left(1-\frac{{t}}{{\tau}}\right) d t$ for $t \leq \tau=v_0 t(1-t / 2 \tau)$
        and $s=\int_0^\tau v_0\left(1-\frac{{t}}{{2}}\right) d t+\int_\tau^t v_0\left(\frac{{t}}{{\tau}}-1\right) d t$ for $t>\tau$
        $\begin{{gathered}} =v_0 \tau\left[1+(1-t /)^2\right] / 2 \text {{ for }} t>\tau \\ s=\int_0^4 v_0\left(1-\frac{{t}}{{\tau}}\right) d t=\int_0^4 10\left(1-\frac{{t}}{{5}}\right) d t=24 \mathrm{{~cm}}.\end{{gathered}}$
        And for $t=8 \mathrm{{~s}}$
        $s=\int_0^5 10\left(1-\frac{{t}}{{5}}\right) d t+\int_5^8 10\left(\frac{{t}}{{5}}-1\right) d t$
        On integrating and simplifying, we get
        $s=34 \mathrm{{~cm}} \text {{. }}$
        On the basis of Eqs. (3) and (4), $x(t)$ and $s(t)$ plots can be drawn as shown in the answer sheet.

        """
        
        answer_s = fr"""
        (a) $x=v_0 t(1-t / 2 \tau), x=0.24,0$ and $-4.0 \mathrm{{~m}}$
        (b) $1.1,9$ and $11 \mathrm{{~s}}$;
        (c) $s=\left\{{\begin{{array}}{{l}}(1-t / 2 \tau) v_0 t \text {{ for }} t \leqslant \tau, \\ {{\left[1+(1-t / \tau)^2\right] v_0 t / 2 \text {{ for }} t \geqslant \tau .}}\end{{array}}\right.$ 
        24 and $34 \mathrm{{~cm}}$ respectively.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_22(self):
        keywords = [
            'kinematics',
            '1.22',
            ]
       
        prob_s = fr"""
		The velocity of a particle moving in the positive direction of the $x$ axis varies as $v=\alpha \sqrt{{x}}$, where $\alpha$ is a positive constant. Assuming that at the moment $t=0$ the particle was located at the point $x=0$, find:
        (a) the time dependence of the velocity and the acceleration of the particle;
        (b) the mean velocity of the particle averaged over the time that the particle takes to cover the first $s$ metres of the path.
        """
        
        
        soln_s = fr"""
        As particle is in unidirectional motion it is directed along the $x$-axis all the time. As at $t=0, x=0$
        So,
        $\Delta x=x=s, \text {{ and }} \frac{{d v}}{{d t}}=w$
        Therefore,
        $v =\alpha \sqrt{{x}}=\alpha \sqrt{{s}}$
        or,
        $\begin{{aligned}}
        w &=\frac{{d v}}{{d t}}=\frac{{\alpha}}{{2 \sqrt{{s}}}} \frac{{d s}}{{d t}}=\frac{{\alpha}}{{2 \sqrt{{s}}}} \\
        &=\frac{{\alpha v}}{{2 \sqrt{{s}}}} \frac{{\alpha \alpha \sqrt{{s}}}}{{2 \sqrt{{s}}}}=\frac{{\alpha^2}}{{2}} \\
        \end{{aligned}}$
        As,
        $v =\alpha \sqrt{{x}}=\alpha \sqrt{{s}}$
        On integrating, $\quad \int_0^v d v=\int_0^t \frac{{\alpha^2}}{{2}} d t \quad$ or, $\quad v=\frac{{\alpha^2}}{{2}} t$
        (b) Let $s$ be the time to cover first $s \mathrm{{~m}}$ of the path. From the Eq.
        $\begin{{aligned}} s &=\int_t v d t \\ s &=\int_0 \frac{{\alpha^2}}{{2}} d t=\frac{{\alpha^2}}{{2}} \frac{{t^2}}{{2}} \\ t &=\frac{{2}}{{\alpha}} \sqrt{{s}} \end{{aligned}}$
        The mean velocity of particle
        $\langle v\rangle=\frac{{\int v(t) d t}}{{\int d t}}=\frac{{\int_0^{{2 \sqrt{{s}} / \alpha}} \frac{{\alpha^2}}{{2}} t d t}}{{2 \sqrt{{s}} / \alpha}}=\frac{{\alpha \sqrt{{s}}}}{{2}}$

        """
        
        answer_s = fr"""
        (a) $v=\alpha^2 t / 2, w=\alpha^2 / 2 ;$ 
        (b) $\langle v\rangle=\alpha \sqrt{{s}} / 2$.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_23(self):
        keywords = [
            'kinematics',
            '1.23',
            ]
       
        prob_s = fr"""
		A point moves rectilinearly with deceleration whose modulus depends on the velocity $v$ of the particle as $w=a \sqrt{{v}}$, where $a$ is a positive constant. At the initial moment the velocity of the point is equal to $v_0$. What distance will it traverse before it stops? What time will it take to cover that distance?
        """
        
        
        soln_s = fr"""
        According to the problem
        $-\frac{{v d v}}{{d s}}=a \sqrt{{v}}$ (as $v$ decreases with time)
        or,
        $-\int_{{v_0}}^0 \sqrt{{v}} d v=a \int_0^s d s$
        On integrating we get $s=\frac{{2}}{{3 a}} v_0^{{3 / 2}}$
        Again according to the problem
        $-\frac{{d v}}{{d t}}=a \sqrt{{v}}$ or $-\frac{{d v}}{{\sqrt{{v}}}}=a d t$
        or,
        $\int_{{v_0}}^0 \frac{{d v}}{{\sqrt{{v}}}}=a \int_0^t d t$
        Thus
        $t=\frac{{2 \sqrt{{v_0}}}}{{a}}$

        """
        
        answer_s = fr"""
        (a) $s=(2 / 3 a) v_0^{{3 / 2}} ; \quad$ 
        (b) $t=2 \vee \overline{{v_0 / a}}$.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_24(self):
        keywords = [
            'kinematics',
            '1.24',
            ]
       
        prob_s = fr"""
		A radius vector of a point $A$ relative to the origin varies with time $t$ as $\mathbf{{r}}=a t \mathbf{{i}}-b t^2 \mathbf{{j}}$, where $a$ and $b$ are positive constants, and $\mathbf{{i}}$ and $\mathbf{{j}}$ are the unit vectors of the $x$ and $y$ axes. Find:
        (a) the equation of the point's trajectory $y(x)$; plot this function;
        (b) the time dependence of the velocity $\mathbf{{v}}$ and acceleration $\mathbf{{w}}$ vectors, as well as of the moduli of these quantities;
        (c) the time dependence of the angle $\alpha$ between the vectors $w$ and $\mathbf{{v}}$;
        (d) the mean velocity vector averaged over the first $t$ seconds of motion, and the modulus of this vector.
        """
        
        
        soln_s = fr"""
        (a) As  
        $\vec{{r}}=a t \overrightarrow{{i-b}} t^2 \vec{{j}}$
        So,
        $x=a t, y=-b t^2$
        and therefore
        $y=\frac{{-b x^2}}{{a^2}}$
        which is Eq. of a parabola, whose graph is shown in the Fig.
        (b) As
        $\vec{{r}}=a t \vec{{i}}-b t^2 \vec{{j}}$
        $\vec{{v}}=\frac{{d \vec{{r}}}}{{d t}}=a \vec{{i}}-2 b t \vec{{j}}$
        So,
        $v=\sqrt{{a^2(-2 b t)^2}}=\sqrt{{a^2+4 b^2 t^2}}$
        Diff. Eq. (1) w.r.t. time, we get
        $\vec{{w}}=\frac{{d \vec{{v}}}}{{d t}}=-2 b \vec{{j}}$
        So,
        $|\vec{{w}}|=w=2 b$
        (c)
        $\cos \alpha=\frac{{\vec{{v}} \cdot \vec{{w}}}}{{v w}}=\frac{{(a \vec{{i}}-2 b t \vec{{j}}) \cdot(-2 b \vec{{j}}}}{{\left(\sqrt{{a^2+4 b^2 t^2}}\right) 2 b}}$
        or, $\quad \cos \alpha=\frac{{2 b t}}{{\sqrt{{a^2+4 b^2 t^2}}}}$,
        so, $\tan \alpha=\frac{{a}}{{2 b t}}$
        or, $\alpha=\tan ^{{-1}}\left(\frac{{a}}{{2 b t}}\right)$
        (d) The mean velocity vector
        $\langle\vec{{v}}\rangle=\frac{{\int \vec{{v}} d t}}{{\int d t}}=\frac{{\int_0^t(a \overrightarrow{{i-2 b t \vec{{j}}) d t}}}}{{t}}=a \overrightarrow{{i-b t}} \vec{{j}}$
        Hence, $|\langle\vec{{v}}\rangle|=\sqrt{{a^2+(-b t)^2}}=\sqrt{{a^2+b^2 t^2}}$

        """
        
        answer_s = fr"""
        (a) $y=-x^2 b / a^2 ; \quad$ 
        (b) $\quad \mathbf{{v}}=a \mathbf{{i}}-2 b t \mathbf{{j}}, \quad \mathbf{{w}}=-2 b \mathbf{{j}}, \quad v=$ $=\sqrt{{a^2+4 b^2 t^2}}, w=2 b ;$ 
        (c) $\tan \alpha=a / 2 b t ;$ 
        (d) $\langle\mathbf{{v}}\rangle=a \mathbf{{i}}-b t \mathbf{{j}},|\langle\mathbf{{v}}\rangle|=$ $=\sqrt{{a^2+b^2 t^2}}$.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_25(self):
        keywords = [
            'kinematics',
            '1.25',
            ]
       
        prob_s = fr"""
		A point moves in the plane $x y$ according to the law $x=a t$, $y=a t(1-\alpha t)$, where $a$ and $\alpha$ are positive constants, and $t$ is time. Find:
        (a) the equation of the point's trajectory $y(x)$; plot this function;
        (b) the velocity $v$ and the acceleration $w$ of the point as functions of time;
        (c) the moment $t_0$ at which the velocity vector forms an angle $\pi / 4$ with the acceleration vector.
        """
        
        
        soln_s = fr"""
        (a) We have
        $x=a t \text {{ and }} y=a t(1-\alpha t)\quad$ (1)
        Hence, $y(x)$ becomes,
        $y=\frac{{a x}}{{a}}\left(1-\frac{{\alpha x}}{{a}}\right)=x-\frac{{\alpha}}{{a}} x^2 \text {{ (parabola) }}$
        (b) Dirferentiating Eq. (1) we get
        $v_x=a \text {{ and }} v_y=a(1-2 \alpha t)\quad$ (2)
        So, $\quad v=\sqrt{{v_x^2+v_y^2}}=a \sqrt{{1+(1-2 \alpha t)^2}}$
        Diff. Eq. (2) with respect to time
        $w_x=0 \text {{ and }} w_y=-2 a \alpha$
        So,
        $w=\sqrt{{w_x^2+w_y^2}}=2 a \alpha$
        (c) From Eqs. (2) and (3)
        We have $\quad \vec{{v}}=a \overrightarrow{{i+}} a(1-2 \alpha t) \vec{{j}}$ and $\vec{{w}}=2 a \alpha \vec{{j}}$
        So, $\quad \cos \frac{{\pi}}{{4}}=\frac{{1}}{{\sqrt{{2}}}}=\frac{{\vec{{v}} \cdot \vec{{w}}}}{{v w}}=\frac{{-a\left(1-2 \alpha t_0\right) 2 a \alpha}}{{a \sqrt{{1+\left(1-2 \alpha t_0\right)^2}} 2 a \alpha}}$
        On simplifying.
        $1-2 \alpha t_0=\pm 1$
        As,
        $t_0 \neq 0, t_0=\frac{{1}}{{\alpha}}$

        """
        
        answer_s = fr"""
        (a) $y=x-x^2 \alpha / a$;
        (b) $v=a \sqrt{{1+(1-2 \alpha t)^2}}, w=2 \alpha a=$ $=$ const; 
        (c) $t_0=1 / \alpha$.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_26(self):
        keywords = [
            'kinematics',
            '1.26',
            ]
       
        prob_s = fr"""
		A point moves in the plane $x y$ according to the law $x=$ $=a \sin \omega t, y=a(1-\cos \omega t)$, where $a$ and $\omega$ are positive constants. Find:
        (a) the distance $s$ traversed by the point during the time $\tau$;
        (b) the angle between the point's velocity and acceleration vectors.
        """
        
        
        soln_s = fr"""
        Differentiating motion law : $x=a \sin \omega t, y=a(1-\cos \omega t)$, with respect to time, $v_x=a \omega \cos \omega t, v_y=a \omega \sin \omega t$
        So, $\quad \vec{{v}}=a \omega \cos \omega t \vec{{i}}+a \omega \sin \omega t \vec{{j}} \quad$ (1)
        and $\quad v=a \omega=$ Const. $\quad$ (2)
        Differentiating Eq. (1) with respect to time 
        $\vec{{w}}=\frac{{d \vec{{v}}}}{{d t}}=-a \omega^2 \sin \omega t \overrightarrow{{i}}+a \omega^2 \cos \omega t \overrightarrow{{j}}\quad$ (3)
        (a) The distance $s$ traversed by the point during the time $\tau$ is given by
        $s=\int_0^\tau v d t=\int_0^\tau a \omega d t=a \omega \tau \quad(\text {{ using 2) }}$
        (b) Taking inner product of $\vec{{v}}$ and $\vec{{w}}$
        We get, $\vec{{v}} \cdot \vec{{w}}=(a \omega \cos \omega t \vec{{i}}+a \omega \sin \omega t \vec{{j}}) \cdot\left(a \omega^2 \sin \omega t(-i)+a \omega^2 \cos \omega t-\vec{{j}}\right)$
        So, $\vec{{v}} \cdot \vec{{w}}=-a^2 \omega^2 \sin \omega t \cos \omega t+a^2 \omega^3 \sin \omega t \cos \omega t=0$
        Thus, $\vec{{v}} \perp \vec{{w}}$, i.e., the angle between velocity vector and acceleration vector equals $\frac{{\pi}}{{2}}$.

        """
        
        answer_s = fr"""
        (a) $s=a \omega \tau;$ 
        (b) $\pi / 2$.

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_27(self):
        keywords = [
            'kinematics',
            '1.27',
            ]
       
        prob_s = fr"""
		A particle moves in the plane $x y$ with constant acceleration $w$ directed along the negative $y$ axis. The equation of motion of the particle has the form $y=a x-b x^2$, where $a$ and $b$ are positive constants. Find the velocity of the particle at the origin of coordinates.
        """
        
        
        soln_s = fr"""
        Accordiing to the problem
        So, $\quad w_x=\frac{{d v_x}}{{d t}}=0$ and $w_y=\frac{{d v_y}}{{d t}}=-w\quad$ (1)
        Differentiating Eq. of trajectory, $y=a x-b x^2$, with respect to time
        $\frac{{d y}}{{d t}}=\frac{{a d x}}{{d t}}-2 b x \frac{{d x}}{{d t}}\quad$ (2)
        So,
        Again differentiating with respect to time
        $\begin{{aligned}}
        &\frac{{d^2 y}}{{d t^2}}=\frac{{a d^2 x}}{{d t^2}}-2 b\left(\frac{{d x}}{{d t}}\right)^2-2 b x \frac{{d^2 x}}{{d t^2}} \\
        &-w=a(0)-2 b\left(\frac{{d x}}{{d t}}\right)^2-2 b x(0) \text {{ (using 1) }} \\
        &\text {{ or, }} \frac{{d x}}{{d t}}=\sqrt{{\frac{{w}}{{2 b}}}} \text {{ (using 1) }} \quad (3)\\
        &\text {{ or, }}\left.\quad \frac{{d y}}{{d t}}\right|_{{x=0}}=a \sqrt{{\frac{{w}}{{2 b}}}} \quad (4)
        \end{{aligned}}$
        Hence, the velocity of the particle at the origin
        $v=\sqrt{{\left(\frac{{d x}}{{d t}}\right)_{{x=0}}^2+\left(\frac{{d y}}{{d t}}\right)_{{x=0}}^2}}=\sqrt{{\frac{{w}}{{2 b}}+a^2 \frac{{w}}{{2 b}}}}$ (using Eqns (3) and (4))
        Hence,
        $v=\sqrt{{\frac{{w}}{{2 b}}\left(1+a^2\right)}}$

        """
        
        answer_s = fr"""
        $v_0=V\left(1+a^2\right) w / 2 b$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_28(self):
        keywords = [
            'kinematics',
            '1.28',
            ]
       
        prob_s = fr"""
		A small body is thrown at an angle to the horizontal with the initial velocity $\mathbf{{v}}_0$. Neglecting the air drag, find:
        (a) the displacement of the body as a function of time $\mathbf{{r}}(t)$;
        (b) the mean velocity vector $\langle\mathbf{{v}}\rangle$ averaged over the first $t$ seconds and over the total time of motion.
        """
        
        
        soln_s = fr"""
        As the body is under gravity of constant accelration $\vec{{g}}$, it's velocity vector and displacemen vectors are:
        So, $<\overrightarrow{{v>}}$ over the first $t$ seconds
        $\langle\overrightarrow{{v}}\rangle=\frac{{\Delta \vec{{r}}}}{{\Delta t}}=\frac{{\vec{{r}}}}{{t}}=\overrightarrow{{v_0}}+\frac{{\overrightarrow{{g t}}}}{{2}}$
        Hence from Eq. (3), $\langle\overrightarrow{{v}}\rangle$ over the first $t$ seconds
        $\langle\overrightarrow{{v}}\rangle=\overrightarrow{{v_0}}+\frac{{\overrightarrow{{g}}}}{{2}}\tau$
        For evaluating $t$, take
        $\overrightarrow{{v \cdot v}}=\left(\overrightarrow{{v_0}}+\overrightarrow{{g t}}\right) \cdot\left(\overrightarrow{{v_0}}+\overrightarrow{{g t}}\right)=v_0^2+2\left(\overrightarrow{{v_0}} \cdot \vec{{g}}\right) t+g^2 t^2$
        or, $v^2=v_0^2+\left(\overrightarrow{{v_0}} \cdot \vec{{g}}\right) t+g^2 t^2$
        But we have $v=v_0$ at $t=0$ and
        Also at $t=\tau$(also from energy conservation)
        Hence using this propety in Eq. (5)
        $v_0^2=v_0^2+2\left(\overrightarrow{{v_0}} \cdot \vec{{g}}\right) \tau+g^2 \tau^2$
        As
        $\tau \neq 0, \quad \text {{ so, }} \tau=-\frac{{2\left(\vec{{v}}_o \cdot \vec{{g}}\right)}}{{g^2}}$
        Putting this value of $\tau$ in Eq. (4), the average velocity over the time of flight
        $\langle\overrightarrow{{v}}\rangle=\overrightarrow{{v_0}}-\vec{{g}} \frac{{\left(\overrightarrow{{v_0}} \cdot \vec{{g}}\right)}}{{g^2}}$

        """
        
        answer_s = fr"""
        (a) $\mathbf{{r}}=\mathbf{{v}}_0 t+\mathrm{{g}} t^2 / 2 ;$ 
        (b) $\langle\mathbf{{v}}\rangle_t=\mathbf{{v}}_0+\mathbf{{g}} t / 2,\langle\mathbf{{v}}\rangle=\mathbf{{v}}_0-\mathbf{{g}}\left(\mathbf{{v}}_0 \mathbf{{g}}\right) / g^2$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_29(self):
        keywords = [
            'kinematics',
            '1.29',
            ]
       
        prob_s = fr"""
		A body is thrown from the surface of the Earth at an angle $\alpha$ to the horizontal with the initial velocity $v_0$. Assuming the air drag to be negligible, find:
        (a) the time of motion;
        (b) the maximum height of ascent and the horizontal range; at what value of the angle $\alpha$ they will be equal to each other;
        (c) the equation of trajectory $y(x)$, where $y$ and $x$ are displacements of the body along the vertical and the horizontal respectively;
        (d) the curvature radii of trajectory at its initial point and at its peak.

        """
        
        
        soln_s = fr"""
        The body thrown in air with velocity $v_0$ at an angle $\alpha$ from the horizontal lands at point $P$ on the Earth's surface at same horizontal level (Fig.). The point of projection is taken as origin, so, $\Delta x=x$ and $\Delta y=y$
        (a) From the Eq. $\Delta y=v_0, t+\frac{{1}}{{2}} w_y t^2$
        $0=v_0 \sin \alpha \tau-\frac{{1}}{{2}} g \tau^2$ 
        As $\tau \neq 0$, so, time of motion $\tau=\frac{{2 v_0 \sin \alpha}}{{g}}$
        (b) At the maximum height of ascent, $v_y=0$ 
        so, from the Eq. $\quad v_y^2=v_{{0 y}}^2+2 w_y \Delta y$ 
        $0=\left(v_0 \sin \alpha\right)^2-2 g H$ 
        Hence maximum height $H=\frac{{v_0^2 \sin ^2 \alpha}}{{2 g}}$
        During the time of motion the net horizontal displacement or horizontal range, will be obtained by the equation
        $\Delta x=v_{{0 x}} t+\frac{{1}}{{2}} w_x \tau^2$
        or, $R=v_0 \cos \alpha \tau-\frac{{1}}{{2}}(0) \tau^2=v_0 \cos \alpha \tau=\frac{{v_0^2 \sin 2 \alpha}}{{g}}$
        when
        $\frac{{v_0^2 \sin ^2 \alpha}}{{g}}=\frac{{v_0^2 \sin ^2 \alpha}}{{2 g}} \text {{ or }} \tan \alpha=4, \text {{ so, }} \alpha=\tan ^{{-1}} 4$
        (c) For the body, $x(t)$ and $y(t)$ are
        $x=v_0 \cos \alpha t$
        and
        $y=v_0 \sin \alpha t-\frac{{1}}{{2}} g t^2$
        Hence putting the value of $t$ from (1) into (2) we get,
        $y=v_0 \sin \alpha\left(\frac{{x}}{{v_0 \cos \alpha}}\right)-\frac{{1}}{{2}} g\left(\frac{{x}}{{v_0 \cos \alpha}}\right)^2=x \tan \alpha-\frac{{g x^2}}{{2 v_0^2 \cos ^2 \alpha}}$
        Which is the sought equation of trajectory i.e. $y(x)$
        (d) As the body thrown in air follows a curve, it has some normal acceleration at all the moments of time during it's motion in air.
        At the initial point $(x=0, y=0)$, from the equation :
        $w_n=\frac{{v^2}}{{R}}$, (where $R$ is the radius of curvature)
        $g \cos \alpha=\frac{{v_0^2}}{{R_0}}$ (see Fig.) or $R_0=\frac{{v_0^2}}{{g \cos \alpha}}$
        At the peak point $v_y=0, v=v_x=v_0 \cos \alpha$ and the angential acceleration is zero.
        Now from the Eq.
        $\begin{{aligned}}
        w_n &=\frac{{v^2}}{{R}} \\
        g &=\frac{{v_0^2 \cos ^2 \alpha}}{{R}}, \text {{ or }} R=\frac{{v_0^2 \cos ^2 \alpha}}{{g}}
        \end{{aligned}}$
        Note : We may use the formula of curvature radius of a trajectory $y(x)$, to solve $\operatorname{{part}}(d)$,
        $R=\frac{{\left[1+(d y / d x)^2\right]^{{\frac{{3}}{{2}}}}}}{{\left|d^2 y / d x^2\right|}}$

        """
        
        answer_s = fr"""
        (a) $\tau=2\left(v_0 / g\right) \sin \alpha$
        (b) $h=\left(v_0^2 / 2 g\right) \sin ^2 \alpha, l=\left(v_0^2 / g\right) \sin 2 \alpha$ $\alpha=76^{{\circ}}$;
        (c) $y=x \tan \alpha-\left(g / 2 v_0^2 \cos ^2 \alpha\right) x^2$
        (d) $R_1=v_0^2 / g \cos \alpha, R_2=\left(v_0^2 / g\right) \cos ^2 \alpha$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

    def get_question_q1_30(self):
        keywords = [
            'kinematics',
            '1.30',
            ]
       
        prob_s = fr"""
		A body is thrown from the surface of the Earth at an angle $\alpha$ to the horizontal with the initial velocity $v_0$. Assuming the air drag to be negligible, find:
        (a) the time of motion;
        (b) the maximum height of ascent and the horizontal range; at what value of the angle $\alpha$ they will be equal to each other;
        (c) the equation of trajectory $y(x)$, where $y$ and $x$ are displacements of the body along the vertical and the horizontal respectively;
        (d) the curvature radii of trajectory at its initial point and at its peak.

        """
        
        
        soln_s = fr"""
        We have, $v_x=v_0 \cos \alpha, v_y=v_0 \sin \alpha-g t$
        As $\quad \vec{{v}} \uparrow \uparrow \hat{{u}}_t$ all the moments of time.
        Thus
        $v^2=v_t{{ }}^2-2 g t v_0 \sin \alpha+g^2 t^2$
        Now,
        $\begin{{aligned}}
        w_t &=\frac{{d v_t}}{{d t}}=\frac{{1}}{{2 v_t}} \frac{{d}}{{d t}}\left(v_t^2\right)=\frac{{1}}{{v_t}}\left(g^2 t-g v_0 \sin \alpha\right) \\
        &=-\frac{{g}}{{v_t}}\left(v_0 \sin \alpha-g t\right)=-g \frac{{v_y}}{{v_t}}
        \end{{aligned}}$
        Hence
        Now $w_n=\sqrt{{w^2-w_t^2}}=\sqrt{{g^2-g^2 \frac{{v_y^2}}{{v_t^2}}}}$
        or
        $w_n=g \frac{{v_x}}{{v_t}}\left(\text {{ where }} v_x=\sqrt{{v_t^2-v_y^2}}\right)$
        As $\vec{{v}} \uparrow \uparrow \hat{{v}}_t$, during time of motion
        $w_v=w_t=-g \frac{{v_y}}{{v}}$
        On the basis of obtained expressions or facts the sought plots can be drawn as shown in the figure of answer sheet.


        """
        
        answer_s = fr"""
        (a) $\tau=2\left(v_0 / g\right) \sin \alpha$
        (b) $h=\left(v_0^2 / 2 g\right) \sin ^2 \alpha, l=\left(v_0^2 / g\right) \sin 2 \alpha$ $\alpha=76^{{\circ}}$;
        (c) $y=x \tan \alpha-\left(g / 2 v_0^2 \cos ^2 \alpha\right) x^2$
        (d) $R_1=v_0^2 / g \cos \alpha, R_2=\left(v_0^2 / g\right) \cos ^2 \alpha$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
    
    def get_question_q1_31(self):
        keywords = [
            'kinematics',
            '1.31',
            ]
       
        prob_s = fr"""
		A ball starts falling with zero initial velocity on a smooth inclined plane forming an angle $\alpha$ with the horizontal. Having fallen the distance $h$, the ball rebounds elastically off the inclined plane. At what distance from the impact point will the ball rebound for the second time?

        """
        
        
        soln_s = fr"""
        The ball strikes the inclined plane $(O x)$ at point $O$ (origin) with velocity $v_0=\sqrt{{2 g h}}$ (1) As the ball elastically rebounds, it recalls with same velocity $v_0$, at the same angle $\alpha$ from the normal or $y$ axis (Fig.). Let the ball strikes the incline second time at $P$, which is at a distance $l$ (say) from the point $O$, along the incline. From the equation
        $\begin{{aligned}} &y=v_{{0 y}} t+\frac{{1}}{{2}} w_y t^2 \\ &0=v_0 \cos \alpha \tau-\frac{{1}}{{2}} g \cos \alpha t^2 \end{{aligned}}$
        where $\tau$ is the time of motion of ball in air while moving from $O$ to $P$.
        As $\tau \neq 0$, so, $\tau=\frac{{2 v_0}}{{g}} \quad$ (2)
        Now from the equation.
        $\begin{{aligned}} &x=v_{{0 x}} t+\frac{{1}}{{2}} w_x t^2 \\ &l=v_0 \sin \alpha \tau+\frac{{1}}{{2}} g \sin \alpha \tau^2 \end{{aligned}}$
        so,
        $\begin{{aligned}} l=v_0 & \sin \alpha\left(\frac{{2 v_0}}{{g}}\right)+\frac{{1}}{{2}} g \sin \alpha\left(\frac{{2 v_0}}{{g}}\right) \\ =& \frac{{4 v_0^2 \sin \alpha}}{{g}} \text {{ (using 2) }} \end{{aligned}}$
        Hence the sought distance, $l=\frac{{4(2 g h) \sin \alpha}}{{a}}=8 h \sin \alpha$ (Using Eq. 1)

        """
        
        answer_s = fr"""
        $l=8 h \sin \alpha$

        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
    
    def get_question_q1_32(self):
        keywords = [
            'kinematics',
            '1.32',
            ]
       
        prob_s = fr"""
		A cannon and a target are $5.10 \mathrm{{~km}}$ apart and located at the same level. How soon will the shell launched with the initial velocity $240 \mathrm{{~m}} / \mathrm{{s}}$ reach the target in the absence of air drag?

        """
        
        
        soln_s = fr"""
        The ball strikes the inclined plane $(O x)$ at point $O$ (origin) with velocity $v_0=\sqrt{{2 g h}}$ (1) As the ball elastically rebounds, it recalls with same velocity $v_0$, at the same angle $\alpha$ from the normal or $y$ axis (Fig.). Let the ball strikes the incline second time at $P$, which is at a distance $l$ (say) from the point $O$, along the incline. From the equation
        $\begin{{aligned}} &y=v_{{0 y}} t+\frac{{1}}{{2}} w_y t^2 \\ &0=v_0 \cos \alpha \tau-\frac{{1}}{{2}} g \cos \alpha t^2 \end{{aligned}}$
        where $\tau$ is the time of motion of ball in air while moving from $O$ to $P$.
        As $\tau \neq 0$, so, $\tau=\frac{{2 v_0}}{{g}} \quad$ (2)
        Now from the equation.
        $\begin{{aligned}} &x=v_{{0 x}} t+\frac{{1}}{{2}} w_x t^2 \\ &l=v_0 \sin \alpha \tau+\frac{{1}}{{2}} g \sin \alpha \tau^2 \end{{aligned}}$
        so,
        $\begin{{aligned}} l=v_0 & \sin \alpha\left(\frac{{2 v_0}}{{g}}\right)+\frac{{1}}{{2}} g \sin \alpha\left(\frac{{2 v_0}}{{g}}\right) \\ =& \frac{{4 v_0^2 \sin \alpha}}{{g}} \text {{ (using 2) }} \end{{aligned}}$
        Hence the sought distance, $l=\frac{{4(2 g h) \sin \alpha}}{{a}}=8 h \sin \alpha$ (Using Eq. 1)

        """
        
        answer_s = fr"""
        $0.41$ or $0.71 \mathrm{{~min}}$ later, depending on the initial angle.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
    
    def get_question_q1_33(self):
        keywords = [
            'kinematics',
            '1.33',
            ]
       
        prob_s = fr"""
		A cannon fires successively two shells with velocity $v_0=$ $=250 \mathrm{{~m}} / \mathrm{{s}}$; the first at the angle $\theta_1=60^{{\circ}}$ and the second at the angle $\theta_2=45^{{\circ}}$ to the horizontal, the azimuth being the same. Neglecting the air drag, find the time interval between firings leading to the collision of the shells.

        """
        
        
        soln_s = fr"""
        Let the shells collide at the point $P(x, y)$. If the first shell takes $t \mathrm{{~s}}$ to collide with second and $\Delta t$ be the time interval between the firings, then

        $x=v_0 \cos \theta_1 t=v_0 \cos \theta_2(t-\Delta t) \quad$ (1)
        and 
        $\begin{{aligned}} y &=v_0 \sin \theta_1 t-\frac{{1}}{{2}} g t^2 \\ &=v_0 \sin \theta_2(t-\Delta t)-\frac{{1}}{{2}} g(t-\Delta t)^2 \quad (2)\end{{aligned}}$
        From Eq. (1) $t=\frac{{\Delta t \cos \theta_2}}{{\cos \theta_2-\cos \theta_1}}\quad$ (3)

        From Eqs. (2) and (3)
        $\Delta t=\frac{{2 v_0 \sin \left(\theta_1-\theta_2\right)}}{{g\left(\cos \theta_2+\cos \theta_1\right)}} \text {{ as }} \Delta t \neq 0$

        """
        
        answer_s = fr"""
        $\Delta t=\frac{{2 v_0}}{{g}} \frac{{\sin \left(\theta_1-\theta_2\right)}}{{\cos \theta_1+\cos \theta_2}}=11 \mathrm{{~s}}$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
    
    def get_question_q1_34(self):
        keywords = [
            'kinematics',
            '1.34',
            ]
       
        prob_s = fr"""
		A balloon starts rising from the surface of the Earth. The ascension rate is constant and equal to $v_0$. Due to the wind the balloon gathers the horizontal velocity component $v_x=a y$, where $a$ is a constant and $y$ is the height of ascent. Find how the following quantities depend on the height of ascent:
        (a) the horizontal drift of the balloon $x(y)$;
        (b) the total, tangential, and normal accelerations of the balloon.

        """
        
        
        soln_s = fr"""
        According to the problem
        (a) $\frac{{d y}}{{d t}}=v_0$ or $d y=v_0 d t\quad$ (1)
        Integrating $\int_0^y d y=v_0 \int_0^t d t$ or $y=v_0 t$
        And also we have $\frac{{d x}}{{d t}}=a y$ or $d x=a y d t=a v_0 t d t \quad$ (using 1)
        So, $\int_0^x d x=a v_0 \int_0^t t d t$, or, $x=\frac{{1}}{{2}} a v_0 t^2=\frac{{1}}{{2}} \frac{{a y^2}}{{v_0}}\quad$ (using 1)
        (b) According to the problem
        $v_y=v_0$ and $v_x=a y$ $v=\sqrt{{v_x^2+v_y^2}}=\sqrt{{v_0^2+a^2 y^2}}\quad$ (2)
        $w_t=\frac{{d v}}{{d t}}=\frac{{a^2 y}}{{\sqrt{{v_0^2+a y^2}}}} \frac{{d y}}{{d t}}=\frac{{a^2 y}}{{\sqrt{{1+\left(a y / v_0\right)^2}}}}$
        Diff. Eq. (2) with respect to time.
        $\frac{{d v_y}}{{d t}}=w_y=0 \text {{ and }} \frac{{d v_x}}{{d t}}=w_x=a \frac{{d y}}{{d t}}=a v_0$
        So, $\quad w=\left|w_x\right|=a v_0$
        Hence $w_n=\sqrt{{w^2-w_t^2}}=\sqrt{{a^2 v_0^2-\frac{{a^4 y^2}}{{1+\left(a y / v_0\right)^2}}}}=\frac{{a v_0}}{{\sqrt{{1+\left(a y / v_0\right)^2}}}}$

        """
        
        answer_s = fr"""
        (a) $\quad x=\left(a / 2 v_0\right) y^2$
        (b) $w=a v_0, \quad w_\tau=a^2 y / \sqrt{{1+\left(a y / v_0\right)^2}}$, $w_n=a v_0 / V 1+\left(a y / v_0\right)^2$.
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result
    
    def get_question_q1_sample(self):
        keywords = [
            'kinematics',
            ]
       
        prob_s = fr"""
        
        """
        
        
        soln_s = fr"""
        
        """
        
        answer_s = fr"""
        """
        result = {
            'keywords': keywords,
            'prob_s': prob_s.strip(),
            'soln_s': soln_s.strip(),
            'answer_s': answer_s.strip(),
            }
        return result

   
    pass
#class LogarithmStoredQuestions:
