 Hi everyone. I wanted to make this video to discuss a little bit about the final project. Hopefully you have started it at this point, where I've at least looked over the project handout and have a good understanding of the questions that are being asked and the analysis you have to do. Today I wanted to just record a little bit about what the physical situation is. This will be going into the first section of your report, just describing the general setup. Go through just a little bit of the mathematical analysis that you'll need to do. I won't walk through it step by step like we've done for the last projects, but I'll try to give you an idea of what mathematical steps or operations need to be taken. So for this project, this is the final project. The basic idea here is that, maybe I'll just say it in words first, we essentially have a study involving these insects, which enter a state of diapause, which I believe is a technical term. In my mind, at least I'm imagining this is some type of hibernation for insects. And insects enter this state when a certain chemical or hormone they have is reduced in levels. And so just to recap that, we have insects entering diapause, essentially when a certain chemical or hormone drops to a certain level. You can look through the project handout. There is a very detailed description of the actual physical situation there that goes into more detail about what exactly this chemical is and what insect species we're considering in this particular project. And I would recommend reading up a little bit on that, just so you can provide some extra explanation and motivation in that first part of your project. And so what we're going to do is, well, we have a secondary chemical, I guess, which is released and it's kind of this oscillatory chemical. And this secondary chemical actually inhibits this first chemical, the one that I've talked about here in this first point. And so if it inhibits it, then it reduces the amount of it, right? And so this oscillatory chemical will slowly over time oscillate and reduce the level of this first chemical until at some point the chemical, the first chemical drops below a certain level and the insects enters this diapause state. So what we're going to do is use a model for a separate chemical. Maybe just to make it clear that it's something different, I'll denote it C. That'll be our running name for it. And the thing about this chemical is that it inhibits, let's say, this chemical here is called A or something. So this secondary chemical C inhibits the first chemical A and we also have another phenomenon where this chemical C, it oscillates over time. And with those two in mind, our goal for this project is the following. Essentially to model with some mathematical equation the level of this chemical C as a function of time. And what happens here is that we have one equation that is coming from a model already. It has a bunch of unknown parameters. Well, just write out what the equation actually is here. It's something of this form. C of t is equal to A naught. Take e to some power. There will be a lot of things in that exponent. I'm going to write them as fractions in the project handout. There'll be decimals, but you should be able to convert back and forth pretty easily. Let's see. So we'll have a minus b. There will be t sub d squared. And I'll try to say what these variables mean afterward. There's a ds of r squared. All of this is being multiplied by t. And I maybe need to make a little bit more room here. This is a long equation. And then we have something like cosine of a bunch of stuff. And that stuff is there's one term that looks like following for t sub d over 5 plus s r over 5. There's t appearing there. There's some phi a phase shift. And then at the end, there's also some kind of shift A naught. So it's maybe helpful to try and group some of these up to figure out what's unknown at what point. So A naught for at least the first two or three parts of the project. You will not have a value for this, nor will you need it. For the first part, we'll be focusing on solving to extract these green variables here, b and d. And for the second part, we're going to be extracting these blue ones. It's t sub d and s sub r. And maybe this phase shift phi will also come in closer to the end. And I should say what some of these variables are at least. So maybe an intermediate goal here, maybe intermediate goals. So maybe the first part will be to use experimental data to solve for essentially the two green variables here. So this experimental data will come from the actual project handout. It's sort of listed out in some section and I'll go into that in just a little bit more detail when we do the mathematical derivation here. And after that, we would somehow like to solve for, maybe that's not the best way to put it. Yeah, maybe the best way to say it is to solve for one of t d or s r. These are these blue ones from above to solve for one of them in terms of the other. And the whole point of this is that somehow at the end of the day, you want to get some c of t and it'll be equal to essentially this formula up here. But the only kind of unknown you'll be seeing is maybe s sub r, for example, if that's what you solve for. So that's the only unknown that'll be appearing here, aside from the ones in red. So you essentially want to knock out, say, like the b, the d and the t sub d and get everything in terms of s sub r. And later on, that'll be useful because there's an optimization step. I'll say a little bit about that shortly. And just a really quick note about what these variables actually are. This t d is supposed to denote some kind of time delay. So the idea is that somehow this equation, so this is giving you sort of a level of this chemical C as a function of time. And this t sub d is a parameter that says, well, the level now kind of depends on what it was 10 seconds ago or 20 seconds ago or something like that. There's some delay parameter where it depends on some previous value in some way. This s sub r, this is a synthesis rate. And you can read more in the project handout about what exactly this signifies when you look at the physical situation. But you can think of it as essentially controlling sort of how fast this exponential decay is happening. We see that this term here, it's like e to some kind of power and that power ends up being something that's negative. So it'll be a form of exponential decay. Okay. So just section these off. I'll try to post these notes up along with the video. One thing to notice before I leave this page is that there's sort of two main things happening here. There's this one giant term on the left. And then there's something that looks like a wave here. So the first term is you can think of it as a kind of amplitude of this wave, except for the amplitude depends on time, right? So it's not just a sine wave with one fixed amplitude, it's a sine wave where the amplitude is like changing at every moment in time. I'll try to draw a picture that shows that a little bit more clearly. But one thing to note here is that whatever this quantity is appearing there in front of the T, you just kind of put on your math blinders and just think about like what's the parent function for this. If I try to abstract away everything that's a number or a variable here. You just think of this as some kind of omega, some frequency for this sine wave. And that'll be useful later because we'll have some data about the period and we can relate the period to the frequency and we can maybe use this to help solve for TD in terms of SR or vice versa, because we have some equation relating them. Okay, so just a really quick sketch of what's going on here just so you have an idea. So I'm going to try to plot essentially C of T versus T here. So that'll be my T axis. This will be my C of T. And at time zero, this chemical will have some value. I don't quite know what it is. Let's see. I need to sort of draw a sort of tube that this function will live in for all time. So it'll be something like this. And what's happening, well, we aren't really considering times before zero. But you can imagine that if you were, there would just be some kind of sine wave, which is just a usual kind of thing that we're used to seeing from class. So that's some period, some amplitude of frequency, all the good stuff. And there is one spot worth noting here is that it has some... I haven't drawn it super accurately here, but it has some amplitude measured by the displacement, not from zero. Remember that the amplitude is not really measuring the height of this function over time or anything. It's measuring how far away it oscillates from sort of a midpoint here. So it has some amplitude, but this amplitude is constant before time zero, if you want to think of it that way. What happens after time zero is a little bit more complicated. Essentially, we have some exponential function. I'll just kind of draw just what that piece looks like. Different color here. You can do that in green. So there's some kind of like exponential function. It's just not asymptotic to zero, but it's rather asymptotic to... So remember that this function, C of t, was sort of shifted up a little bit. So as you kind of go out to infinity, let me go back to this equation here. If you think about kind of what's happening with this term, with this entire equation, this thing is going to be exponential decay on the left. So as you take bigger and bigger numbers, this thing will get smaller and smaller and smaller, which means that if you take numbers big enough, this entire term here, so the entire cosine wave will be kind of like damped out. It will be going to zero. It will have no oscillation. So this entire term I've squared in green here will be sort of getting smaller and smaller and going to zero. But notice that this shift here isn't really changing over time. So this thing isn't actually limiting to zero. It's limiting to something like probably A naught down here. And what you have going on in the meantime is you have some kind of sine wave. It continues on, but it's amplitude is being controlled by this exponential envelope here. Actually, I can go ahead and fill this part of the graph in since this is where graph will actually exist. And as you go to infinity, it kind of damps off and the oscillations get smaller and smaller. So it's important to note that this is going to be some kind of shifted cosine or a shifted sine, so it's not necessarily starting at a zero point here. So this is just t equals zero, but it's not necessarily, you know, you don't want to think of this as like y equals zero or something like that or y equals one. It's not starting out at the minimum or the maximum necessarily or the midpoint of it's like where a usual sine wave would go. And so we, I guess what happens here is that one thing you can pull off of this graph is that at some point there's this ideal situation where I think it's t equals two days. And if you kind of go out to this time here and see where that happens, the idea is that after you are in this region to the right of t equals two days, something is happening here. So this is essentially where the amplitude reaches. Maybe it's 40% is what they say is ideal. All right, so this amplitude is kind of dying off over time, sort of at 100% at time zero and at some point, you know, it's 80% at some point it's 70% and certainly at some point it's 40%. And coming from the sort of scientific data saying ideally that should be at t equals two days. And what happens is that once the chemical drops below this level, this is when the insect inserts, when the insect enters this diapause state. That's, you know, for the rest of time. Okay, and I think that's all I want to say about this graph here. So I'll maybe list out what data do we have. And I would say for this first part, there are really four important things to note from the project handout. One is that at TD equal to 27.0, I'll leave it up to you to figure out what the units are here, but you might have to adjust things. If you're doing everything in terms of days, for example, then you might want to check the units here and make sure that things match up. So if you have TD equals 27.0 and SR equals 0.13, something happens. The oscillations decrease to, I think this one is 80% after or really at T equals 0.5 days, one half a day. And so, warning here, you may need to convert two hours or minutes or seconds or something like that, just to make sure that all of your time units are consistent. Okay, and you have a second piece of data, which is essentially, it's really the first one, but with some different numbers. Which is why I'm just copying it down here. The second one is now if TD is 38.5 and SR is instead 0.10, and it reaches 70% at T equals one half days. Same word of warning there, you might have to convert. There will be, there's an estimated number of periods per day explained in the handout that looks to be 72. And this fourth piece of information we've already stated in the graph, but we'll need it. And the calculation is that the diapause state is triggered when the oscillations decrease to 40%. Ideally, this is at T equals two days. Okay, so what are some things you're going to do here? I'll just say in words, the first thing, the first sort of major goal is we want to get an equation for C of T, just in terms of either T sub D or S sub R, you can solve for one in terms of the other. What will you do after that? You'll do some sort of sensitivity analysis, essentially just like maybe project one and project two, changing some of the parameters, seeing how much the outputs change, maybe describing which ones, which of these parameters more heavily influences the amount of the chemical. What's the most important one, the one you need to measure most carefully? And at some point you'll need to determine a hypothetical value for both T, D and S sub R that give you the slowest rate of decay. And so this is going to be a maximization problem. And essentially what you'll get here is something like a quadratic, so it'll be something familiar to you. We're just finding a parabola. We have a parabola and we're just finding the max or the min point on it, so the vertex of this parabola. Okay, so now that we have sort of a larger idea of what the strategy is, let's see what this first step we need to do will be. So yeah, on the way to, so we need C of T equals some function maybe involving just SR. So that's kind of like our main goal. And then a sub goal here is we need to solve for, how would we call these variables, B and D. Okay, so let's look at that solving for B and D. So essentially we're going to use, let me go back, pull a copy of the actual equation here. So this is the giant long equation, very complex, but we won't need all of that complexity all the time. Let me just erase stuff to clean this up. Okay, so here is, I don't know, I've lost part of the, see if I can grab it. Okay, cool. Okay, so here is the original form of the equation. And what I would like to do is put on some math blinders. So I want to see this as C of T equals, well, don't really care so much about what's in this term right here for this exact moment. So I'm just going to call this some F of T. And what do I see in the next term? Well, something complicated, but it's just some G of T. And then there's kind of this plus A knot on the end. Okay, so just giving different names to things. Why is this a useful thing to do? Because we want to, going back to this, we want to make use of these first two pieces of information to solve for B and D. And these are telling us something about, okay, the oscillations are decreasing to some percentage of their original value. And so we're writing it this way. Sort of what is the amplitude in this original function here? Well, it's everything kind of out in front of the cosine. So it's really this entire term. So this is an amplitude. What does that translate to down here? Well, this whole thing is an amplitude. And so if I use that information from one, so let's use number one from the last page, just a quick reminder of what that was. This said that when TD was 27 SR 0.13, then we had an 80%. So we had oscillations that were 80% of what they could have been at the maximum occurring at T equals one half. Okay, how do I write this in mathematics? This is telling me that essentially a naught times F of T is equal to 0.8 F of, oh, sorry, a naught. So 80% of the original oscillation or the original amplitude. So remember that this whole term here, just to say not F of T, this is just another way of saying the amplitude at time T. Right hand side is saying it's equal to 80% of the original amplitude and words. And this happens at T equals one half. Another way of saying that is that a naught of F of one half equals 0.8 a naught. I've just written this, but let's go ahead and assume a naught is not zero so we can divide through. And we have an equation like this F of one half is equal to 0.8. But I've left out a little bit of information here. We've kind of forgotten the fact that this actually relied on some very specific parameters. So this was when TD equals 27.0 and SR equals 0.13. So this F of T that I've written here isn't really the same as this F of T. Just kind of tracing that back with this exponential term here because this F of T has TD and SR as unknowns. And so what I'm going to do is actually just plug in the TD and SR values I get. And so I should really be calling this something like this is like an F1 of T and F1 of T. And so what is F1 of T? Something that looks like e to the, let's see, we had five one hundredths plus I guess this is a negative or minus a b. But we plug in TD squared so there's a 27.0 squared minus a d, 0.13 squared. And I'm just leaving T to be a variable here. So maybe I'll just make this a note off to the side that F1 of T is just literally equal to what I've written here. Why am I calling it F1 of T? Because like F of T is with all of these unknowns TD and SR. F1 of T is where I'm plugging in this first set of like this first experiment where we determine these two variables TD and SR. So this is like some modification of F and we'll see a little bit later. We'll want to keep these names separate a little bit. Let's see what do you get here? So you get something that looks like that's maybe easier on a new page. So you have something that's like F1 at maybe this is one half. Keep in mind that this is in days so you may need to convert this to 12 hours. It's equal to 0.8. This just just follows from the previous stuff. So now let's kind of unbox what we had called F1. So this is saying e to the 5 over 100 minus b TD squared and we had a value for TD. So this was 27.0 squared minus d and SR squared. So this was 0.13 squared and we're evaluating at a specific T. So maybe this is one half equals 0.8. So that's just rewriting the equation. I've kind of packed everything up nicely in order to make the intermediate equations a little bit easier to handle. But now we have to unpack it and actually solve it. So what am I going to do now? Well, standard maneuver from this course when you apply the natural log to both sides. And we remember that we can do this because the exponential and the natural log are inverse pairs. And you might be a little bit concerned about domains and ranges. So I'll leave it up to you to check to make sure that this move here should be justified. So applying log to both sides and kind of log the log of e to the thing just being that thing. You should say some words about why that works. Okay, so you have some equation here. And the important thing to note is that there is a b, there is a d, and everything else is a number. So this is good. So we have one equation, one equation and two unknowns. And we've seen this kind of thing before where if we have two unknowns, we kind of need two equations in order to pin everything down. So we need to do something else now. So we have one equation. Let's bookmark this. This will be important for us. Maybe like one of our major equations. Maybe label it in your report, say this is equation number one or something like that. Give it some kind of name so you can refer back to it later saying, okay, now using equation one and equation two, we're doing such and such. And it helps to kind of keep track of things that way. So what I claim to do here, what I claim the best thing to do next is to now use number two. Sorry, let's go all the way back. So we've kind of reached the end of what we can do with this first piece of data. And so we've used now this one. So next up is using the second piece of data. And you can see it's really just going to be the same game, but I'll try to write out a few steps. So what happens for number two? Well, I'm really just going to write out something of the form. Well, let's see how much can we copy from the previous one? Let's do this and just see what we need to change. Okay, so C of t is essentially, I mean, we haven't changed what the formula is for that so that I can stay. In your report, you don't have to re-mention what this formula is here. I'm just putting it here so we can look at it along with these more complicated formulas. This was like a simplification step, right? So I just kind of wrote the formula in a different way where I put on sort of math blinders to abstract away some things. Now we want to use number two. And what did number two say? I'm going to move this off to the side. This said that A naught, so we're going to have to have a different name for a function here. Maybe I'll call this F2. And this was telling us something about, I want to say it was 78%, just double check. Yeah, so the important variables here were 38.5, 0.1, and 70%. And just so you have those for reference. Okay, so that means that, so just write this in. Just reading this part here in words. This is saying that, so what is F2? F2 is where I've plugged in some new values of t, d, and s of r. So I'm saying that, well, the amplitude, which was right, this entire part of this function at some time t is equal to 70% of the original amplitude provided some conditions are holding t equals one half still holds. That's the same for one and two. The values of TD and SR change. So TD is now 38.5. SR is 0.10. And we've taken into account this 70%. So we get rid of all of this. So we play the same game here where we divided through by a not to get some equation like this F2 of a half is 0.7. What actually is F2? F2 is just the name I'm giving to taking F and plugging in these values down here to the actual TD and SR values. It looks like we need to change this to 38.5 and this to 0.10. Make a copy of this because we'll need it. All right, so this is the equation that we have. We'll do the exact same thing. So I have two of t was this thing. This last equation we had said F2 of one half is equal to 0.7. So we'll just go ahead and do that here. Plugged in one half for t. So this is equal to 0.7. Of course, just the same game. I'll apply natural log to both sides. I get some equation that looks like this. And I guess I need to multiply all of this by one half. That whole thing is equal to the natural log of 0.7. And the nice things happening here are that, again, the only unknowns that are appearing here are B and D. So this is an important equation. So I need something like this. Maybe call it, label it something. It's number two, equation two or something like that. And as in the case before, this is the step you'll want to justify. Explain why you can take the natural log of both sides. Are there any domain issues? Are there any range issues, that kind of thing? Say something right about how log and the exponential are an inverse pair. And it should be good. Okay, so let's see. We now have this equation number two. If we go back a little bit, let's zoom out here. We had this equation number one. So here is our first equation coming from using that first piece of info. Here is a second equation of some extra stuff that came along for the ride. Okay, so there are two equations and two unknowns. And that means we're in business. We can solve. So you'll actually get out of this process some numerical values. Well, really estimates for B. That was kind of the whole point of this maneuver. Remember, we're in the larger scheme of things we're trying to solve for T sub D and S sub R. And we have this B and D parameter floating around. So we want to eliminate as many parameters as we can. And now we've eliminated B and D. So now the next step, essentially what we want is to get C of T equals something that let's just say it only involves S of R. What I mean by this is just there's no T sub D appearing or I guess B or D. We already have numerical estimates for those. So you can just plug those directly into the formula at this point if you want. Okay, so we'll need to use the third and fourth piece of information from before. So you do here is using number four. Go back to our distant past and find out what that was. So we have now used number two. The last two pieces of information were about this number of periods per day. And this sort of ideal time when diaposis triggered. Okay, so I'll just copy these here, a smaller version, so we can keep them on hand for reference. So number four, so the diaposis trigger when the oscillations decreased to 40% and that ideally this is at T equals two days. Well, we're really just playing this game a third time. I go back here. So we're doing this whole thing once more. So we just copy this in again. Okay, starting from the top left, we just know that CFT is some amplitude here, some F of T. So let's call F2 of T. So what do we want to plug in now? Well, this will be an unknown. I think this one was, sorry, this is T sub D I think, T sub D squared. And then there's a minus D S of R squared. We're defining a function called F3 here. Really just all of these F's are just different versions of this exponential where we're just plugging in various things. Here I haven't plugged in anything yet. So what I've just written here is just F of T and multiply it by T at the end. And the reason it'll be an F3 of T is because you'll have an estimate for B coming from that last part. That'll be an actual number and you'll have an estimate for D. That'll be an actual number. Leave it up to you to find out what those numbers are. But now you have some function where the unknowns are TD and SR. So we can't do this part. We don't really know what TD and SR actually are. We can do this part. So this says the diapause is triggered when oscillations decrease to 40%, which should occur at two days. So this is just translating this into a mathematical formula. This is telling me that a not F of T or F3 of T, which is this third amplitude where we've sort of found values of B and D and we've actually plugged them in. When the oscillations decrease to 40%, so this is 0.4 a not. This is supposed to occur at T equals two days. And right, this could be your 48 hours or minutes or seconds, depending on how you do things. Okay, now we can sort of continue the same game. So we need to solve something that looks like F3 of T equals 0.4. If we just drop that on the next page. That's what F3 of T is. We need to set this equal to 0.4. Now we're just going to take the log of both sides. So nothing new, nothing fancy happening here. I guess we should have plugged in T equals two. Let me take the log of that side, brings that down. On this side, we get the log of 0.4. And let's ask ourselves what were we originally trying to do? We're trying to sort of solve for SR or TD in one of these in terms of the other. So at this point, you can do something like this. You have TD and SR appearing here, one equation and two unknowns. You can solve for one in terms of the other. And I'll maybe just mention one other thing you might need here. So what you're going to get is that, yeah, so let's just note that this is, or rather it only involves TD and SR. So for example, solve for say SR equals something. Maybe this something will be an H of TD. I'll mention just one other thing that will be useful here. I can go back to the actual original equation. So there is this part of the original equation if we're just looking at the CFT. And I mentioned in the beginning that it's important to note that this thing is a frequency omega. So let me just pull this into the last page and there's a plus five here. So just from looking at this term, one thing you'll want to do is use piece of info number four. It's going to give you a little bit more information about this. Just go back to find what that actually was. Or sorry, I guess number three here, just number of periods per day. It's piece of info number three. So we're calling what that was, or 72 periods per day. And what I claim you can do here is that, so you have one equation of this form. Omega is equal to four TD over five plus SR over five. So that's one equation you have just from calling this thing omega. And you can get another equation from this piece of data somehow. Omega equals something else. And this will be your input into that. So you have to sort of think about a way to convert this 72 periods per day into something that looks like something you can feed into a cosine function. So you might end up needing to do something like, let's see, maybe 24 hours in one day. So now you have periods per hour. And let's see. Or sorry, this was, I think cycles is the terminology they use here. Sorry, one second, let me just check. Yeah. So I think they use cycles. So you just might call this cycles instead of one day for every 24 hours. And maybe you want to have something like two by radians per one cycle. So maybe something roughly along these lines is what you might want to use for that. Okay. And when you do that, you should be able to. So there'll be some intermediate work. But this should be enough info to let you write C of T equals something involving now. Or so maybe something not involving B, D or say T sub D. So maybe you solve for. So I only in terms of SR, and maybe there's an A not. And you may or may not from this kind of information up here, you may be able to to determine that phase shift that was occurring in the cosine wave in the equation. And so this is kind of the ideal situation where now you're just down to terms of a not in SR. You might need to do a couple of extra steps to sort out what that phase shift is. But essentially what you'll get here is now something maybe I won't say too much more about this. You need to maximize something. So whatever that something is will be a quadratic. So maybe in SR, for example. So you get something that looks like maybe something SR squared. There'll be some term in front of it. Plus something SR plus some constant term. Maybe you'll end up with some equation like that. You want to graph it. Of course, just some kind of parabola. I guess in this case, I guess. Yeah, I guess at this point you should check with the physical intuition to see whether this should be an ups up like a parabola facing up or a parabola facing down. But in either case, let's just say you get one that's facing down and you're maximizing, then you essentially just want to find the vertex of that from optimizing this equation. Okay, so that should at least give you enough information to get pretty well started on the first section and sort of moving into the second one where you're finding the slowest rate of decay.