-
Posts
5127 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Events
Everything posted by Dave
-
Calculus I - Lesson 3: Properties of the derivative
Dave replied to Dave's topic in Analysis and Calculus
You might want to take a look at 1) iii). I'm not sure why you calculated maxima and minima for all of those, I only wanted the one from the nasty polynomial -
Yes, if you want to use streams, it's quite easy (and very powerful): #include <iostream> #include <sstream> #include <fstream> using namespace std; int main() { int n = 10; string temp; for (int i = 1; i <= n; i++) { stringstream mystream; string temp; ofstream fileout; mystream << i << ".txt"; temp = mystream.str(); fileout.open(temp.c_str()); fileout.close(); } return 0; } Good, init?
-
There's nothing wrong with Coventry - I live there, after all (That wasn't intended as sarcasm btw )
-
He just strikes me as a bit odd, really.
-
It depends on the textbook. Most of my A-level maths was based out of some good textbooks and good exercises to get you into it. However, we recently had a lecture course on differential equations which was textbook based, and it was rather dire.
-
Calculus I - Lesson 2: A continuation from first principles
Dave replied to Dave's topic in Mathematics Tutorials
So, the next lesson is out (at last)! Closing this thread, all questions should be submitted to the next one. Cheers. -
Hello again! I know it's been rather a while since the last thread, but I'm hoping that someone's still out there I know there's been a fair amount of demand for this to continue, so I plan on posting another few at least. I really must apologise for my absense; things have been happening rather fast around here recently! So, this lesson is all about properties of the derivative and what you can do with it. I feel this may blend a little into the next topic I planned to cover, but nevermind. The answers from last time's post are all in the previous thread - if they're not, just ask me for them. Some properties Right. So, we've gone off and differentiated our nice little function. Now what? Well, there's a few issues that we need to bring up. First of all, I don't think I really explained myself very well last time when we considered some functions with constants in them; for example we know how to differentiate xn, but we don't really know how to differentiate axn - I didn't really mention this, I just assumed it which was quite bad. Let us assume that we have a function, y = axn, where a is a constant (like 2, 3.4, sqrt(2), etc). Then: [math]\frac{dy}{dx} = a \frac{d}{dx}(x^n)[/math]. In fact, this rule applies to any function that we can think of - we certainly don't know how to find the derivative of the sine function, for example, but it's certainly true that: [math]\frac{d}{dx}(a\sin(x)) = a \frac{d}{dx}(\sin(x))[/math]. So, now I've cleared that out of the way, some other facts about the derivative. Suppose you've got a nice quadratic curve, y = x2 + 5x + 6, and you want to find the gradient at a certain point. Our rule will only cover you for functions by themselves - what do we do about functions that are added together? Well, we can use a really simple fact about the derivative of this function: [math]\frac{dy}{dx} = \frac{d}{dx}(x^2+5x+6) = \frac{d}{dx}(x^2) + \frac{d}{dx}(5x) + \frac{d}{dx}(6) = 2x + 5[/math]. We can just split up the derivative into sums of little bits that we know how to differentiate. Sidenote for the interested reader: Try to prove this using first principles - it's not all that hard! Please, please, please note that this is NOT true for something like y = x * x2. We can even show this isn't true. We know that by simplifying this down using the laws of indices, y = x3, which has the derivative 3x2. But if we apply the same kind of rules as we did before, we get the derivative being 2x instead! There is a correct way of doing this (called the product rule), and we shall cover it later. Maxima and Minima Suppose, again, that we have our quadratic graph y = x2 + 5x + 6. It's quite easy to find the roots are, and then go off and plot it nicely on a piece of paper. If you look at your graph, you'd notice that it dips at the bottom, and then comes back up again. We call this a critical point or turning point - a point at which the graph "turns" - just before the critical point, it was going down, and just after it's heading upwards. We call this type of critical point a minima for obvious reasons. There is, as you would guess, another type of turning point. For example, if you reflected the graph in the x-axis, you would find a point on the graph where just before this point, the graph would be heading up and just after heading down. We call this (quite unimaginatively) a maxima. I give some examples of both of these types of points in the image at the end - they're quite easy to see, it's just a bit hard to describe them using words Now let me give you another quadratic: y = 673x2 + 2348x - 28734. Suppose I want you to find the critical point of this. It's not easy this time - plotting the graph might be a little tricky! So, how do we do this? Well, the easiest way is to use our good old friend, the derivative. "But how?!?!", you say. Well, let's consider what happens around a turning point. As we get closer and closer to it, you might see that the gradient of the curve gets very small. Indeed, you might even guess that at the turning point, the gradient would be zero - and you've be right. (If you can't see this, draw any old turning point and then draw tangents as you get closer to it, then look at the gradient of the tangents). So, if we have some function y, then we can find out where the turning points are, simply by using the fact that at a turning point, the derivative is zero. Let's try and do this for the first example and you can draw and confirm the result. We showed earlier that: [math]\frac{dy}{dx} = \frac{d}{dx}(x^2+5x+6) = \frac{d}{dx}(x^2) + \frac{d}{dx}(5x) + \frac{d}{dx}(6) = 2x + 5[/math]. Now, we want to find out the value of x for which we have a turning point. So: [math]\frac{dy}{dx} = 0 \Rightarrow 2x+5 = 0 \Rightarrow x = -\tfrac{5}{2}[/math]. (Remember, [math]\Rightarrow[/math] means "implies that".) Well, that was a bit easy! We can even work out what the value of y is at this point, because we have a formula for that. (I'll leave this as an exercise). However, the more astute amongst you may have noticed that all we've done is actually found out that we have a turning point at x = -5/2. We didn't actually find out which kind of turning point we get. To do this, we have to use something called the second derivative. Although it sounds quite technical, it isn't. When we differentiate a function, we call this the first derivative. Logic prevails, and if we differentiate again, we get the second derivative. (Indeed, if we keep doing it, we get the third, fourth, fifth, etc derivatives). We also introduce some special notation: [math]\frac{d^2 y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right)[/math] As you can see, it's a much shorter than writing the gubbins on the right In practical terms, it doesn't mean a lot. For example, if we have the function y = x3, then: [math]\frac{d^2 y}{dx^2} = \frac{d}{dx}(3x^2) = 6x[/math]. There are some more exercises to do at the bottom, but the idea behind the second derivative is fairly straight-forward. How does the second derivative relate to critical points? The simple answer is this: If [math]x^*[/math] is a critical point and [math]\frac{d^2 y}{dx^2} < 0[/math] at [math]x^*[/math], then [math]x^*[/math] is a maxima. If [math]\frac{d^2 y}{dx^2} > 0[/math] at [math]x^*[/math], then [math]x^*[/math] is a minima. I hope you take that all in: by [math]x^*[/math], I just mean a single point - it's just an easy bit of notation. I won't try and explain it for now; just accept it, and I will hopefully try and explain towards the end (when I do the roundup). If you didn't get it, go over and try again. It'll get there eventually Some people may have spotted that I haven't stated what happens when [math]\frac{d^2 y}{dx^2} = 0[/math]. Well, there is a third type of critical point, namely a point of inflexion - for an example, look at x3 when x = 0. You see that the gradient at x = 0 is zero, but the point is not a maxima or a minima. Points of inflexion are harder to detect and it isn't the case that if the second derivative is equal to zero, then it's a point of inflexion - other odd things can happen as well. We shan't cover that here, but it involves looking at the third derivative of the function. So, an example. Let's take our classic quadratic, y = x2 + 5x + 6. We already showed that it has a turning point at x = -5/2. Let's try and see whether we can prove it's a minima. For this quadratic, we get: [math]\frac{d^2 y}{dx^2} = 2[/math]. This is a particularly easy case; 2 > 0 (obviously), so we have a minima. Done! For a more non-trivial example, let's look at a cubic equation, namely y = x3 - x. We want to find out where the critical points are on this graph and what type they are. First, let's differentiate the function: [math]\frac{dy}{dx} = 3x^2 - 1[/math]. Now, set this equal to zero: [math]\frac{dy}{dx} = 0 \Rightarrow x^2 = \frac{1}{3}[/math]. So now we square root both sides to obtain: [math]x = \pm \frac{1}{\sqrt{3}}[/math]. Notice that I leave everything as it is; no decimals around here! So, we know our critical points. What type are they? To work this out, we need to find the second derivative. [math]\frac{d^2 y}{dx^2} = 6x[/math]. Now, put our values of x in: so, when [math]x = +1/\sqrt{3}[/math], the second derivative will be [math]6/\sqrt{3} > 0[/math], so we have a minima. When [math]x = -1/sqrt{3}[/math], the second derivative will be [math]-6/sqrt{3} < 0[/math], so we have a maxima. If you plot the graph (this isn't too hard either), you'll find that this looks about right. We would never have been able to work that out precisely by just looking at the graph either! That just about sums it up for this lesson; again, it's a lot to take in, but I plan on making some more exercises for you all tomorrow at some point. Until next time, - Dave Exercises 1) Calculate the derivative of the following functions: i) [math]x^2+5x[/math] ii) [math]x^{-2}+17x[/math] iii) [math]\frac{3}{\sqrt{6x}} + 4x^{8/3}[/math] iv) [math]\frac{1}{x}\cdot \frac{x^2}{a^2} + a^4[/math], where a is constant. 2) Calculate the second derivatives of all the functions above. 3) Calculate the value of x for which the horrible polynomial for earlier will have a turning point. Give the y value as well. (You might want to use a calculator ) 4) (Harder) Let's assume that we have a cylinder that we want to fill with precisely 1 litre of water (i.e. the volume of the cylinder is equal to 1 litre). Obviously, we can do this by letting the cylinder be different heights and radii - what we would like to do is to minimize the surface area of the cylinder, just for the heck of it. a) Calculate the surface area S of the cylinder in terms of its height h, radius r and pi. b) Using the fact that the volume is 1, express S in terms of just r (hint: use substitution). c) Now we have a regular function, just like y=x. This time, however, S is some function of r. Calculate the turning points for the function and find a minima for S. Question 4 is, of course, quite hard for people who have just picked all of this up. We're going to do a couple examples next time, but if you have a bit of free time, take a look! Please, as always, rate the thread and your feedback is always appreciated. Cheers.
-
Anyone interested in C#/VB should definately check out the Mono Project. Basically, it's an open-source implementation of the .NET framework. It is, as they say, rather good, especially when combined with the GTK# wrapper and xorg. I'm considering using it to develop some linux applications, although I may be beaten over the head by my fellow CS associates.
-
If it's portrayed in the correct light, then I would expect it to be good. Even so, I wouldn't watch it - I suppose I don't like the idea of TV companies making a nice profit off of all of this.
-
I don't know what to expect really; as someone said earlier, the security council definitely needs a complete overhaul. Beyond that (as you say), who knows? I suppose that one of the points I was trying to make in my post (but failed to mention) was the fact that this really sets a dangerous precedent in terms of other countries having disagreements. Maybe I'm blowing this out of proportion too much, though.
-
It's a part of a theory that is generally regarded to be correct amongst the scientific community. Relativity is based upon a series of posulates made by Einstein, and as such you can't really prove it. However (as with most things in physics), you can show that your theories fit the experimental data that you've got. So far, relativity seems to fit the bill quite nicely.
-
theory of energy? lol thats not entirely right is it?
Dave replied to Sarahisme's topic in Classical Physics
No, we can't have a "perfectly" closed system. But, for something like a pendulum, it makes life a whole bunch simpler if we neglect friction/air resistance/other annoying forces. If we took into account every single factor when modelling a system, then the equations would be horribly complex (assuming we could even do it in the first place). The idea is to strike a balance between the model becoming completely inaccurate and having complex equations that may or may not have a solution. -
It means you've probably made an error in your mathematics at some point I can't remember the equations, I'm afraid, so I'm probably not the best person to ask at this point.
-
If you have questions, then the best way of getting answers is just to ask them There's quite a few people around here with expertise in differing areas.
-
If I think what I think you mean by this term (I've never really heard the word used in the context of the course), then yes. Basically we studied systems of animal gaits, modelling them as systems of coupled oscillators and then went on to investigate their symmetry groups. Otherwise, no
-
I couldn't agree more - it just really doesn't help that the US went ahead and undermined everything the UN is supposed to stand for. This all boils down to the fact that the US feels that it can just simply choose a country to invade and then go and do it; if that attitude prevails, then there simply isn't any point in having the UN.
-
There's already a big thread for this already (in the stickies section) so I'm going to close this. To answer your question: probably not. We don't see a lot of that kind of stuff around here (that I've seen, at least).
-
Well, you tell us What kind of things would you be interested in? As YT said, it's a bit of an open-ended question.
-
Buy a book, look on the net, go to the library...?
-
Why is there no forum for (insert field here)?
Dave replied to Sayonara's topic in Suggestions, Comments and Support
I do believe its current guise is the Pseudoscience/Metaphysics forum -
I saw something similar to what you mention on BBC's Horizon programme a few years back. Don't know whether it's the same thing though.
-
Good post; we need more discussion of mathematical biology on here If you're interested in looking at applications of group theory, then mathematical biology has a lot to offer in terms of looking at symmetry groups and the like. I've just finished a course entitled "Modelling Nature's Non-linearity" - pretty much half of it was dedicated to animal gaits and modelling systems of coupled oscillators. On the downside, I now have a beasting assignment that needs to be done. Oh well, at least it has a question about modelling an animal with two legs at the back and one at the front
-
What I mean by an iterative map is something along the lines of: [math]x_{n+1} = f(x_n)[/math]. I suppose I should just call it a map I don't really know what you're trying to achieve here; I can't think of any special properties that a strange attractor involving primes might have.
-
Hmm. I'm not entirely sure how you'd do this. You might want to think about coming up with some kind of iterative map using primes in there somehow. The problem I foresee is that you're going to have to work with the reals and not just integers in order to create a strange attractor.