User:Egm6321.f12.team2/Report7

=Introduction=

Summary
This report primarily covers hypergeometric functions, as equations and solutions to differential equations, and derivations of alternate coordinate systems (ie. Cartesian to Spherical.) Also explored is usage of variation of parameters to solve a L2-ODE-CC.

Team Members
Zhe Wang Yitien Yan Ranjit Alexander Karl Van Wyk Anubhav Mohan

=R*7.1 - Plot a Hypergeometric Function=

Plot
Plot the hypergeometric function $$ F(5,-10;1;x) $$.

Plot
We can plot the hypergeometric function in MATLAB using the function hypergeom, as follows:

This results in the following graph:



The above MATLAB code can be changed in lines 6 and 8 to isolate local minima or maxima. By doing so we find that, there is a local minimum at x ~ 0.0722 and y = -0.32905 and a local maximum at x ~ 0.2289 and y = 0.14809.

Show That
We can expand the hypergeometric function using the general form:

which in the case of this hypergeometric function is:

The Pockhammer symbol $$ (q)_n $$ is used in ($$) for variables a, b and c. The general form can be expanded to:

So, ($$) can then be expanded to:

The series stops at $$ n = 11 $$, because at that point the $$ (b)_n $$ term goes to zero, since $$ (-10 + 11 - 1) = 0 $$ and hence causes the entire series to go to zero at higher values of $$ n $$.

Now we have the final solution for the hypergeometric function and can begin to prove the relation stated in ($$).

We can expand the RHS of ($$) by first expanding the exponential term, as follows: $$ (1-x)^6(1001x^4 - 1144x^3 + 396x^2 - 44x + 1) = (1 - 6x + 15x^2 - 20x^3 + 15x^4 - 6x^5 + x^6)(1001x^4 - 1144x^3 + 396x^2 - 44x + 1)$$

($$) is the same as ($$), therefore, ($$) is valid.

Given
The following L2-ODE-CC, With the initial conditions, $$ y(t_0),y'(t_0)$$, and the solution,

Also, the solution is also given by Dong 2012 as follows, with $$\lambda_l = \sqrt {\mu_l^2+1}$$.

Find
Show that the solution to ($$}) is ($$}) by using variation of parameters. Additionally, compare ($$}) and ($$}) to Dong's equations, ($$}) and ($$})

Solution
From lecture in section notes 34, the solution to a second order nonhomogenous ODE was derived as follows through variation of parameters. Total solution from (3) p.34-5: Where $$u_1(t),u_(t)$$ are the first and second homogeneous solutions, respectively. $$y_p(t)$$ is the particular solution. The first homogeneous solution is typically given, assumed, or derived through some other means. With the first homogeneous solution known, the second homogeneous solution and particular solution are obtained from variation of parameters as follows. From (4) p.34-5: From (1) p.34-6: It was previously shown in Report 6, problem 7 (in references below) that ($$}) agrees with King 2003 p.8 (1.6), i.e., where,

Also, comparing ($$}) and ($$}), the following is true: Since $$u_1(t)$$ is given as the first homogeneous solution, the second homogeneous solution is obtained from ($$}). Therefore, ($$}) and ($$}) match. Next the particular solution is shown to match as well. It was shown that the particular solution obtained from variation of parameters, ($$}) is equivalent to a more manageable form, ($$}) and ($$}}.

Therefore, ($$}) and ($$}) are indeed the same, and the given solution and the solution obtained from variation of parameters are the same. Following, this solution is the same as Dong's with just the following notational differences.

Given
From (2) p. 38-6, we can obtain

From (1) p. 39-1, we can obtain

From (2) p. 39-1, we can obtain

From (3) p. 39-1, we can obtain

Find
Part 1 Part 2 Laplace operator in spherical coordinates

Part 1 For spherical coordinate
Then we obtain:

Plugging ($$),($$),&($$) into ($$), then we get: Thus, we obtain that($$) is true.

Part 2 For Laplace operator in spherical coordinate
Since we have the equation: We can get the following equation:

Since we have the following equations, Plugging the above equations ($$) We will get the Laplace operator in spherical coordinates ， So the part 2 of the problem has been solved.

Given
The governing equation for a particle moving with air resistance with initial velocity,$$z(0)=50$$ is

This relation comes from equating the unbalanced forces on the particle.ie$$mz'+kz^n=mg$$, where $$m$$ is mass, $$z$$ is the verticle velocity,$$v_y$$,$$k$$, the proportionality constant for air resistance and $$g$$ is the acceleration due to gravity. Here $$a=\frac{k}{m}=2,b=g=10$$

Also the solution to the integral is given as

Where

For each value of $$n$$,find the vertical velocity $$z(t)$$ v/s $$t$$. Plot the function.Also find and plot the altitude $$y(t)$$ v/s time,$$t$$, then find the time that the projectile returns to the ground.

If an explicit expression for $$z(t):- v_y(t)$$ cannot be obtained, use a numerical method to find $$z(t)$$ for each given value of time t for $$n=2,3.$$

Part 1
For each value of $$t$$, solve for ,$$z(t)$$ and then plot $$z(t)$$ versus $$t$$ for values of $$n=1,2,3$$. Find the time when the projectile hits the ground in each case.

Part 2
Use Matlab command "roots" to find the appropriate roots, z for each given time t. Plot z vs t, then find y(t) by integrating z(t) with respect to time using the trapezoidal rule.

Part 3
Use Matlab function "hypergeom" to find the time t for every given value of z within an interval. Plot z versus t, and find y(t) by integrating z with respect to time using the trapezoidal rule. Compare to part 2.

Part 4
Verify previous parts by using Matlab's ode45 command to obtain z(t) from the L1-ODE-CC, the use trapezoidal rule to obtain y(t)

Part 5
Verify previous parts by using Matlab's ode45 command on the system of 1st order ODE's.

Part 1
For n=1 Here the equation of motion becomes becomes, Substituting values for $$\frac{k}{m}$$ and $$g$$ gives, Solving for the vertical velocity,$$z(t)$$ gives, To derive the equation of motion of the particle, i.e the altitude with respect to time we write equation ($$) as,

Integrating both sides gives From the Altitude v/s Time graph, it can be noticed that there is a maximum altitude after which it comes down. Also from the Velocity v/s Time graph it can be noticed after a sufficient period of time the velocity is virtually constant. This velocity is the "terminal velocity", which occurs when the two opposing forces of gravity and air resistance effectively cancels each other. In a body moving which terminal velocity, there is no net force acting on the body and so it moves in a constant velocity.

Equating the velocity to zero, we can get the time at which the altitude is maximum.Thus,from ($$), we get Taking log on both sides, The altitude at this time is got by inputing t=1.2 in eqn 343, Thus, the projectile reaches a maximum height of 19.0053 after a time of 1.2 units. The terminal velocity can be found by doing a limit of time tending to infinity in the equation for velocity. Thus the terminal velocity is -5 units.(Negative since the velocity is pointing downwards). The time when the particle returns to the ground is found by letting y=0 and solving for t in ($$). Doing so gives t=5.5 units. The velocity when the body returns to the ground by substituting t=5.5 units in ($$) Hence the body returns with the terminal velocity.

For n=2: Here the equation of motion becomes, Substituting values for $$\frac{k}{m}$$ and $$g$$ gives, Solving for the vertical velocity,$$z(t)$$ gives, By partial fractions the integral becomes, Integrating,we get Re-arranging, we get the expression for $$z(t)$$ as,

To derive the equation of motion of the particle, i.e the altitude with respect to time we write ($$) as,

Integrating both sides gives

Evaluating this integral is beyond me.An alternate expression for $$z(t)$$ is obtained from wolfram alpha for ($$) as,

($$) is the expression for velocity. From the plot of the graph, it can be noticed it is not continuous everywhere.It has discontinuities at intervals of $$\frac{\pi}{2\sqrt 5}$$.Also a closed form solution for the altitude can be obtained by integrating ($$) as follows, From $$\int tan(t)=-log(cos(t))$$, we get, This equation will also have discontinuities at intervals of $$\frac{\pi}{2\sqrt 5}$$.The plots of both Velocity v/s Time and Altitude v/s Time is given below. From the velocity plot, it is obvious that the particle reaches zero velocity when the term within the tan function in velocity ($$) becomes zero.That is, the velocity is zero, and hence the altitude is maximum at $$1.526-2t\sqrt5=0$$. This is at t=0.3412 units and this is evident in the velocity graph.Now considering the fact that the velocity graph is symmetrical about the y-axis at t=0.3412, the velocity graph extends to the right for a t=$$\frac{\pi}{4\sqrt 5}=$$0.3512 more.Hence the time when the particle reaches the ground is $$t=0.3412+0.3512-(0.3512-0.3412)=0.6824$$ units. The value $$(0.3512-0.3412)$$ is reduced from the total to account for the fact that the velocity starts from 50 units and not from infinity.The velocity of the particle when it reaches the ground is given by entering the value of time when the particle hits the ground to the velocity equation.Hence,

For n=3:

From the values of $$a=2, b=10, n=3$$ the solution for $$z(t)$$ is

Then,

This approximates to,

The equation ($$), is an implicit equation in $$z(t)$$.An explicit equation cannot be obtained fro this relation for $$z(t)$$. The graph of ($$),which is the Velocity v/s Time graph, for all real values of y are given below.OF our interest, is the part of the plot drawn in red. For points ear zero, the plot cannot be obtained because the drop in velocity is so steep that the slope tends to infinity. So,the point closest to the y axis is obtained at t=0.0712 units. So the graph is only relevant from t=0.0712 to the time when the particle reaches the ground. From the graph it is also obtained the time,t=0.2067 units, when the velocity is zero(This is also obtained by entering z(t)=0 in ($$) . Hence, the maximum altitude is given by the area under the curve from t=.0712 to 0.2067 which is obtained by approximating the graph between these two points as a line.Various values of z(t) for differing values of t are obtained in the table below.

As can be seen from the values, velocity decreases as time increases.The velocity profile can be approximated to a line graph.From the above table of values the equation is line regressed and is approximated to z=-10.25t+2.15. This is illustrated in the figure below by plotting $$z(t)$$ versus time $$t$$. From the approximation, the equation for altitude is obtained by integrating the velocity function. Thus To obtain the time at which it reaches the ground equate ($$) to 0. Thus the body returns back after 0.42 time units.The maximum altitude is given by inputing the value of t=0.02067 in the altitude equation ,($$),which gives y=0.225 units.



Part 2
For this section, ($$) was processed as follows to produce a velocity/position versus time plot. The first step was to inject time, t (throughout an interval) into the equation, and solve for the roots of the 10th order polynomial. If there existed a real root for some time, t, then that root was saved in an array. This process was continued on the time interval [0,5] seconds. This array of roots appeared to be heavily oscillatory with time, and so those roots that made up the upper bounds were removed leaving the final plot as shown below in blue. Green indicates the position which was obtained through trapezoidal integration of the blue plot. Due to the excessive data processing, there existed no data points from [0,.1], however this plot still looks very similar to those following.

The Matlab code for this process is shown below:



Part 3
The following is the Matlab code used for this section:

The plot obtained from this section is shown below:

Part 4
The following is the Matlab code used for this section: The plot obtained from this section is shown below:

Part 5
The following is the Matlab code used for this section: The plot obtained from this section is shown below:

Comparing all of these plots, one can see that the results are similar, but slightly different due to numerical errors. The most accurate would be that plot obtained in part 5 because integrating as a system of equations with ode45 is numerically more accurate than when using hypergeometric functions and/or the linear trapezoidal rule for integration.

Find
1. Find $$ \left\{ dx_{i}\right\} =\left\{ dx_{1},dx_{2},dx_{3}\right\} $$ in terms of $$ \left\{ \xi_{j}\right\} =\left\{ \xi_{1},\xi_{2},\xi_{3}\right\} $$ and $$ \left\{ d\xi_{k}\right\} =\left\{ d\xi_{1},d\xi_{2},d\xi_{3}\right\} $$

2. Find $$ ds^{2}=\underset{i}{\sum}\left(dx_{i}\right)^{2}=\underset{k}{\sum}\left(h_{k}\right)^{2}\left(d\xi_{k}\right)^{2} $$. Identify $$ \left\{ h_{i}\right\} $$ in terms of $$ \left\{ \xi_{i}\right\} $$.

3. Find $$ \triangle u $$ in cylindrical coordinates.

4. Use separation of variable to find the separated equations and compare to the Bessel equ. (1) p.27-1.

2
Using the results obtained in ($$), ($$), and ($$): From ($$), we can identify:

$$ \left\{ h_{i}\right\} =\left\{ 1,\xi_{1},1\right\} $$

3
Laplace operator in general curvilinear coordinate is defined as:

and $$ h_{1}h_{2}h_{3}=\xi_{1} $$.

For $$ i = 1 $$:

For $$ i = 2 $$:

For $$ i = 3 $$:

Sum up ($$), ($$), and ($$), $$ \triangle u $$ can then be obtained:

4
Let $$ u\left(\xi_{1,}\xi_{2},\xi_{3}\right)=P\left(\xi_{1}\right)Q\left(\xi_{2}\right)R\left(\xi_{3}\right) $$ and $$ \triangle u=0 $$.

After substituting $$ u\left(\xi_{1,}\xi_{2},\xi_{3}\right) $$ into ($$) we have:

Multiply ($$) by $$ \frac{\xi_{1}^{2}}{PQR} $$:

If we define $$ \frac{1}{R}\frac{d^{2}R}{d\xi_{3}^{2}} = \beta, \frac{1}{Q}\frac{d^{2}Q}{d\xi_{2}^{2}} = -\nu^{2} $$and rearrange ($$):

Bessel function is in the form of $$x^2 \frac{d^2 y}{dx^2} + x \frac{dy}{dx} + (x^2 - \alpha^2)y = 0$$.

Note: $$\xi_{1}, P\left(\xi_{1}\right), \nu $$ correspond to $$ x, y, \alpha $$ respectively.

From observation, there is an additional coefficient $$ \beta $$ in front of $$ \xi_{1}^{2} $$ in ($$) as compared with the Bessel function.

Given
The Laplacian in astronomical spherical co-ordinates $$(\xi_1,\xi_2,\xi_3)$$ is given by

Also, the new relationship between the spherical co-ordinate system variables $$(r,\bar \theta ,\phi )$$ with the astronomy convention is given in the following figure.

Find
Find $$\Delta u$$ in spherical co-ordinates.

Solution
As can be seen from the figure $$\xi_1=r,\xi_2=\frac{\pi}{2}- \bar \theta,\xi_3=\phi $$. So by changing the $$\theta$$ to $$\bar \theta$$, we can get the $$\Delta u$$ is spherical coordinates.Also noting here that $$cos(\frac{\pi}{2} - \bar \theta) = sin \bar \theta$$, $$\Delta u$$ becomes