## Velocity Vectors: Secondary Solutions!

Hello, again! Encouraged by my sudden lack in homework and with interest in the problem at an all-time high, I decided to write a Part 2 about the idea of velocity vectors immediately! 😀
If you haven’t read the original post, I would highly suggest doing so first: https://elytraflight.com/2021/05/17/velocity-vectors-circles-and-calculus/ The main objective of this post is to go over two different approaches to the same problem, and to discuss their benefits and drawbacks. For now, however, let’s do this!

First, let’s reiterate the problem:

“A particle moves along a curve so that its position vector and velocity vector are perpendicular at all times. If the particle passes through the point (4, 3), what is the equation of the curve?”

## Solution 2

In the previous post, we used a solution involving linear algebra, but who wants linear algebra? After all, linear algebra is just a bunch of funny number magic, right?

So, we decide to attack the problem an alternative way!
Consider what it means for two lines to be perpendicular. With two lines in the form of y = mx + b, the slopes have to be negative reciprocals of each other (e.g. 1/2 and -2 in the diagram below).

What does this mean for our problem? Let’s recall our position vector s(t) = (x(t), y(t)). The “slope” of our position vector, in this case, can be found with the general “rise over run” technique: m = (y-0)/(x-0) = y/x.

However, as we mentioned before, our velocity vector, v(t) = (x'(t), y'(t)), is perpendicular to the position vector! Thus, we know that the “slope” of our velocity vector, y'(t)/x'(t), is the negative reciprocal of y/x, which happens to be -x/y. So, this is what we end up with:

However, the second equality is more than just an equation; it’s a differential equation! A differential equation that we have the tools to solve, as a matter of fact!

Our first step is to separate the variables. We can move the dx to the right side and the y to the left side, to arrive at an equation as follows:

Time to integrate both sides!

Voila! We have arrived at the exact same answer as we did with the other method. Just like last time, we can plug in a specific case for x and y to find a specific case. Beautiful! 😀

## Solution 3

And, last but not least, we have our final solution! Suppose we are still slightly suspicious of dot products, but we’re willing to give parametric functions (and some inefficient but cool techniques) a chance. Edit: After researching this solution a bit more, I realized that this solution gets crazy quite quickly. Buckle up!

Jumping right in, we reintroduce our vectors s(t) = (x(t), y(t)), and v(t) = (x'(t), y'(t)). However, this time we have a twist. This time, we don’t end up removing t to get a general form of the circle equation in terms of x and y. No; this time, we dig even deeper. What we intend to do today is find both x(t) and y(t) in general form.

In the above example, we see that we are taking advantage of a very important characteristic of perpendicular vectors. We take the x position, making it negative and multiplying by some constant a (as we do not want to assume that the velocity vector is the same magnitude as the position vector).

Note that we are multiplying by a constant value a. This will be important at the end.
So here’s the two equations we have so far:

x'(t) = a y(t)
y'(t) = -a x(t)

Let’s start by manipulating the first equation, moving a to the other side.
y(t) = x'(t)/a
Now, we take the derivative of both sides:
y'(t) = x”(t)/a
We now have two different formulas for y'(t). Let’s set them equal to each other!
x”(t)/a = -a x(t)
x”(t) = -a2x(t)

We now have a seemingly simple differential equation, with the second derivative in terms of the original function. However, we can’t just integrate, as that would leave us with a first derivative and some unruly antiderivative of x(t).
Our options are running out! With no options left, we have no choice but to put on our LaTeX gloves (hahaha I’m hilarious) and set out on a journey into Laplace Land.

Ahh, sunlight fills our eyes, and fresh air enters our lungs. At last, after all that pain and effort, here we are with our two final, completely general equations for x(t) and y(t):

And, you know what this means! If we find x2+y2, it will equal some constant not in terms of t, which is the radius of our new circle squared. Granted, this newly-found radius of the circle will be in terms of the given values for x(0), x'(0), and a, but that is to be expected.

Some of the incredibly astute may recall previously experimenting with piecewise functions, and how these trig functions are by no means the only two functions that can produce circles. For instance, something as simple as

can follow the path of a (semi)circle within its domain. Furthermore, parametric functions like these also satisfy the property of having position vectors and velocity vectors being perpendicular, since x2+y2=R; in the previous solutions, we demonstrated that this is enough to conclude that the velocity vector is always tangent to the position vector in such a scenario. However, our very complex-looking trigonometric formula up above is incredibly special, in that it is the only general case parametric function out there whose value for “a” stays constant everywhere. In other cases, such as x(t) = t, the two vectors are perpendicular, but the ratio in magnitudes varies wildly depending on t. In our above case, however, a stays constant. Everywhere.

If one is skeptical, we can test these formulas, and demonstrate that for any value of x(0) and x'(0) and a, the difference in magnitudes of the position and velocity vectors will indeed still be a, and by taking the derivatives of the formulas for x(t) and y(t) show that the formulas do indeed work out with what they should be. A true mathematical miracle.

This concludes the third and final solution to this amazing problem. What a crazy experience! This took me about 10 hours of work to finish, between the three different solutions. I now intend to rest for the time being.

It’s been an honor to have all of you readers along on this journey. As always, until we meet again, best wishes, and happy exploring!

– Ely

## Velocity Vectors, Circles, and Calculus

Hello, everyone! While I have been drifting through my sea of homework, I came across a rather interesting problem involving circles and velocity vectors. The problem goes as follows:

“A particle moves along a curve so that its position vector and velocity vector are perpendicular at all times. If the particle passes through the point (4, 3), what is the equation of the curve?”

## Building Intuition

Part of what makes the problem so interesting is our ability to come up with a general case, usable for any provided point of contact, and not just (4, 3)! First, let’s imagine what such a situation with perpendicular velocity and position vectors might look like.

One such possibility that fits the description would be a circle. As seen in the diagram, the velocity vectors v1, v2, and v3 (which happen to be tangent to the circle) are all perpendicular to their respective position vectors, r1, r2, and r3.

However, as we can soon see, there are multiple different (and rather beautiful) ways that we can prove that the only possible general curve is a circle!

## Solution

Let’s do this! First things first, let’s describe our particle’s motion by describing it as a vector, where the x and y positions and x(t) and y(t) respectively, where t is time. We can write our position vector as s(t) = (x(t), y(t)).

What’s more, we can take the derivative of our position vector with respect to time to get a velocity vector! 😀 To accomplish that, all we need to do is take the derivative of the x and y positions separately. (Taking the derivative of a single-variable function f(t) results in f'(t), pronounced f prime of t. One might visualize the derivative as being the “rate of change” of a function, or how fast the function is changing at time t.)

v(t) = (x'(t), y'(t)).

From here, we can employ a neat trick from linear algebra known as the dot product. Essentially, the dot product helps us find the angle between two vectors. In this case, we know that the angle between our position vector (x(t), y(t)) and our velocity vector (x'(t), y'(t)) must be 90 degrees.

This is where the fun begins! One important aspect of the dot product, as we see on the bottom left, is that the dot product of perpendicular vectors is always 0. Thus, we can say that in all cases, s(t) · v(t) = 0.

The dot product of two vectors is calculated by summing the products of the same components of both vectors. For example, (3, 4) · (5, 6) = 3 * 5 + 4 * 6 = 15+24 = 39. However, (0, 2) · (3, 0) = 0 * 3 + 2 * 0 = 0. This makes sense, because (0, 2) and (3, 0) are perpendicular.

If we expand out s(t) · v(t) = 0, we get (x(t), y(t)) · (x'(t), y'(t)) = 0. If we expand this out using the above definition, we get that x(t) * x'(t) + y(t) * y'(t) = 0. This is cool, but how can we proceed from here? ANTIDERIVATIVES!

Indeed, if you noticed that the original functions are multiplied by their derivatives and were reminded of the chain rule, you would be onto something important. Because we have x(t) * x'(t), we are provided with a very clean antiderivative.

Now we have some math steps:

And we have it! Does the final equation look familiar? x2 + y2 = D, where D is the radius of the circle squared! In the above problem, we can plug in x(t) = 4 and y(t) = 3, and we get D = 9 + 16 = 25, meaning that the curve our particle is following is a circle with a radius of 5! 🙂

This post is running longer than I was originally intended, so I’ll make sure to write a Part 2 regarding the two other interesting ways of solving this problem if you’re interested. Until then, best wishes and happy exploring!

– Ely

Many thanks to my Calculus instructor, Ms. Nguyen, for inspiring me to write this post, as well as providing students with many different opportunities to succeed this year! For further explanation in regards to calculus and linear algebra, I would highly suggest checking out the amazing YouTube channel 3Blue1Brown for detailed and immersive visuals to help understand those sorts of topics on a deeper level! Here is his channel: https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw You can also subscribe; it’s completely free, WordPress handles all of privacy concerns, and you get notified whenever something new comes out!

## The Hardy-Weinberg Principle, and Mathematics within Biology

When we consider low-level biology courses, we may tend to think of more memorization-based concepts, such as the names of dozens of different organelles within a plant cell, as well as their various functions. In many cases, biology courses remain completely descriptive, removing any form of mathematics to avoid confusing the students any further than they already are. There are a few cases in biology, however, where instructors are required to introduce some mathematics to the curriculum; a welcome break from all the memorization required!

Consider a population of herbivorous moths, enjoying a sequestered life on a far-away island, with no predators to worry about and enough food to maintain a stable population of 1,000 moths. Inside the DNA of these moths resides a particular gene known as gene X. Gene X can have two different possible “variants”, capital A and lowercase a. Each moth cell has two copies of this gene, one from its mother and one from its father. As biologists, we know that the capital A variant corresponds to being a red-colored moth, and the lowercase a variant to being a blue-colored moth. The capital A variant is dominant over the other, meaning that if your father or mother gave you the red variant, you would also be a red moth. However, having two a variants results in a blue moth. These kinds of genes can be represented in a Punnett Square, as seen in the diagram below.

When two moths reproduce, one copy of the gene from each parent is contributed (at random) to create the child moth, leading to four possible equally-likely results. This concept of how genes are transmitted will help us understand the math behind the Hardy-Weinberg Principle.

Now that we understand the nature of how two individual moths reproduce, let’s zoom out to the bigger picture, considering the case of a population with 1,000 moths. Using our god-like omnipotence, we know that at this point in time there are a total of 1000 lowercase a gene variants in the population, and 1000 uppercase A variants. exactly 250 moths with two lowercase a variants, 250 moths with two uppercase A variants, and 500 with one uppercase A and one lowercase a. Following the Punnett Square logic seen above, it follows that both the 250 homozygous red moths (AA) and the 500 heterozygous moths (Aa) are red, resulting in a total of 250 + 500 = 750 red moths. Let’s unpack this information:

Awesome! We see that the totals gene variants add up correctly — There should be twice as many copies of the gene as there are moths, as every moth has 2 copies. This also highlights an important aspect of observing such populations. Although there are an equal amount of A and a variants in the population, 75% of the population is still red. Why is that?

Recall that the A variant is dominant. Any moths that have the Aa genotype are still completely red. One could say that some of the blue a variants are “wasted”, as they do not contribute to the color when the A variant is present.

Now that we have some of the background necessary, we can begin to explore the question of what the Hardy-Weinberg Principle actually tells us.

This may sound complicated, but we can break down this concept into more understandable terms. An allele is the scientific name for the different “variants” of a particular gene that we mentioned earlier. For instance, in our above example, the a and A variants are both examples of different alleles.

The term “allele frequency” refers to how many of each variant of the gene are present. For instance, the a allele’s frequency would be 50%, since 1000 of the 2000 alleles in the population are type a.

What does it mean for the allele frequencies to remain constant? Let’s consider the moth example again. Right now, we have a total of 1,000 moths, with 1,000 a alleles and 1,000 A alleles. Now, let’s say the moths have been reproducing a lot, and now there are 2,000 moths. Using the Hardy-Weinberg principle, we can also say there are now 2,000 a alleles and 2,000 A alleles. Furthermore, if there were 750 red moths and 250 blue moths, now there are 750 × 2 = 1,500 red moths, and 250 × 2 = 500 blue moths!

This may seem fairly straightforward. Twice as many moths, twice as many of each kind of moth. Simple algebra, right?

What makes Hardy-Weinberg so interesting, however, is that this neat pattern of multiplication only occurs under a specific set of circumstances — when the population is in Hardy-Weinberg Equilibrium.

There are a few requirements for a population to be in Hardy-Weinberg Equilibrium, but here are the main ones:

• Mate choice must be completely random. If Mr. Moth #295 has a particular affinity for Ms. Moth #296, tough luck. Everything must be random, otherwise we run the risk of mate selection rendering certain alleles “better” than others, which would disrupt the balance between the two alleles.
• As we mentioned above, having one allele must provide no advantage over having the other. If being blue makes it easier to survive or reproduce than being red, then over time there will be more blue moths, disrupting the balance.
• There must be no movement in or out of the population, or any other abnormal activity. That’s why our moths are on an island in the middle of nowhere; escapees or new visitors could also disrupt the balance.
• The population must be fairly large. In all cases, the Hardy-Weinberg principle deals with averages, not exact numbers. Perhaps a red moth eats a poisonous plant and dies, leaving behind 749 red moths and 250 blue moths. Although it isn’t ever exact, the ratio can still be treated as approximately 3:1. In an extreme example, if our population has a total of 4 moths, the chance of a random occurrence throwing off the balance gets to be extremely likely. This concept is known as genetic drift, an interesting topic in its own right.

Now that we understand what the Hardy-Weinberg Principle describes and under what criteria it occurs, how can we prove that this phenomenon would occur in this way? Now the math starts to get really interesting.

Let’s return again to our example of a population of 1,000 moths which we assume are in Hardy-Weinberg equilibrium. Let’s say this time, however, there are only 500 A alleles, and 1,500 a alleles. Punnett Square time!

At this point, our next step is to calculate the “expected” amount of alleles generated with a case of 16 baby moths. In math, to calculate the expected value we multiply the probability by the number of “trials”, in this case the 16 moths.

Since the Punnett Square has been reduced to one row and column, the math becomes a bit less complex. The probability of the child being AA is the probability of getting two A‘s in a row (because the population is large we can treat it as an independent event). In math, the probability of one event AND another event can be calculated by multiplying the probabilities. Since we know that 1/4 of the alleles are A in this case, the probability of getting two As is 1/4 × 1/4, or 1/16.

Likewise, the probability of being Aa is the same as getting either an A from the father and an a from the mother, OR getting an a from the father and an A from the mother. Since 1/4 of the alleles are A, and 3/4 of the alleles are a, and there are two ways of doing it, the probability is 2 × 1/4 × 3/4 = 3/8.

Finally, the probability of being aa is the probability of getting two a‘s in a row, or 3/4 × 3/4 = 9/16. From here, we can convert these probabilities to expected values, totaling the genotypes to find the expected values for each allele.

The expected value of AA genotypes will be 16 × 1/16 = 1. However, since the AA genotype contains two As, the expected value of A alleles from being AA will be 2. Next, since there is only 1 A allele in the Aa genotype, the expected value of A alleles from being Aa will be 16 × 3/8 = 6. Adding these together, we get that the total expected number of A alleles is 8! Following similar logic (that is a bit too long for the article), we get that the total expected number of a alleles is 24.

Voila! Just how the original ratio of A alleles to the total was 1:4, the expected ratio of A alleles in the 16 baby moths is also 1:4! When new moths were created, the allele ratio stayed the same. This, in essence, demonstrates the Hardy-Weinberg Principle. Complicated, but beautiful! The light at the end of the tunnel!

In summary, the Hardy-Weinberg principle states that whenever a population is in genetic equilibrium, any new organisms will always follow the same patterns as their predecessors.

Like always, there are many interesting questions left unanswered. What practical use does this concept have? What happens to a population that isn’t in genetic equilibrium? Rest assured there will be plenty of time to go over this at a future date. Until we meet again, best wishes and happy exploring!

– Ely

Many thanks to my biology instructor, Mr. Lewis, for introducing me to Hardy-Weinberg, and inspiring me to create this post! For further exploration, I would recommend checking out Khan Academy’s excellent article: https://www.khanacademy.org/science/ap-biology/natural-selection/hardy-weinberg-equilibrium/a/hardy-weinberg-mechanisms-of-evolution You can also subscribe; it’s completely free, WordPress handles all of privacy concerns, and you get notified whenever something new comes out! 🙂

## Test

Hi! This is technically the first blog post on my website. I’m fairly new to WordPress, the service with which I am creating my blog, so this is only a trial run to see what happens when I create a blog post using their designated button. Have a good night, everyone! 🙂