• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

math question: measuring derivative from a graph

Status
Not open for further replies.

7imz

Member
how the hell do you do that. I'm used to being given the functin then finding the derivative of that function at a given point.

i have this assignment where we have a graph of a function (i dont' have the function itself); i have to find estimates of derivates at specific points then use that to find the function... it's a numerical analysis course... any ideas?
 

Hsieh

Member
Derivative is the instantaneous change in the graph. Take two known points in the graph, (x1, y1) and (x2, y2), then the change in the graph is (y2 - y1)/(x2 - x1). The smaller the value of (x2 - x1), the closer you get to the derivative. Since you aren't given the function, you don't need to find the exact derivative, get a close approximation should be good enough.
 

Loki

Count of Concision
Graphically, the derivative at any point is the slope of the curve at that point; this results from the fact that the derivative is defined as the slope of the line tangent to the curve at the point being studied. If it's a complex curve and you are given tabular values (i.e., coordinate sets for various points already defined on the curve), then you can simply use Riemann sums, which involve taking the slopes (delta-Y divided by delta-X) of successively smaller intervals about the point in question from either side, and seeing how the slope trends (e.g., if it approaches some fixed numerical value, which is how the derivative is actually defined; i.e., the limit as X approaches zero of the derivative expression).


Hope this helps some, and I hope it's at least partially correct-- I'm very rusty with this stuff, as math is not my forte. :p


EDIT: Once you arrive at your answer for the derivative, just take the integral to get the original function. Hopefully you've learned the rules for solving intergrals in your calc course, or perhaps you have a calc book lying around somewhere. :) If you aren't given Cartesian coordinates (i.e., "x,y") for the points being asked for, you'll have to estimate them from the axes.
 

Diablos

Member
Loki said:
Graphically, the derivative at any point is the slope of the curve at that point; this results from the fact that a derivative is tangent to a curve at the point being studied. If it's a complex curve and you are given tabular values (i.e., coordinate sets for various points already defined on the curve), then you can simply use Riemann sums, which involve taking the slopes (delta-Y over delta-X) of successively smaller intervals about the point in question from either side, and seeing how the slope trends (e.g., if it approaches some fixed numerical value, which is how the derivative is actually defined; i.e., the limit as X approaches zero of the derivative expression).


Hope this helps some, and I hope it's at least partially correct-- I'm very rusty with this stuff, as math is not my forte. :p
Loki, is there anything you don't know? I'm not saying this to be a smartass or insult you... I'm serious. You scare me. At least I can disagree with your politics sometimes.
 

Loki

Count of Concision
Diablos said:
Loki, is there anything you don't know? I'm not saying this to be a smartass or insult you... I'm serious. You scare me. At least I can disagree with your politics sometimes.

:lol

Yeah, there's a lot of stuff I don't know, mostly because I'm a total slacker and haven't done any extracurricular reading in many years. Really, though, your praise is misplaced in this instance, as this is high school-level math. :p (no offense to 7imz, obviously-- we all forget stuff :))


The person you should really be asking that question to is -jinx-. Dude even scares me sometimes. :D Thanks for the compliment anyway, though. :)
 

nitewulf

Member
more information would be helpful. are you given a graph on a graph paper with detailed axis indentations, ie, can you intercept a point on the graph and gather its xy-coordinates by looking at the axes?
 

7imz

Member
nitewulf said:
more information would be helpful. are you given a graph on a graph paper with detailed axis indentations, ie, can you intercept a point on the graph and gather its xy-coordinates by looking at the axes?

yep
 

nitewulf

Member
ok, few more questions, what level course is this, and have you done taylor approximations?
im fairly certain that you'd have to use the taylor method to solve the problem.
if it's an introductory course, then you could get away with using the linear approximations.
bear with me then,
pick a point, let's assume this point is (x1,y1), recall y=f(x1). draw a tangent line through this point and pick another point on the line, a very small distance away from it. now notice, the slope of the line that goes through these two points is
[y - f(x1)] / [x - x1], correct?
now recall that the tangent line is the slope of the particular function at that particular point,
so, the derivative of this function is equal to the slope (at that point)
[y - f(x1)] / [x - x1] = f' (f prime)
going from here, just solve for y
y = f(x1) + f'*[x - x1]
recall y = f(x)
so,
f(x) = f(x1) + f'*[x - x1]
this will only work if the graph is slow moving (ie, does not change drastically), if it does then you'd have to use higher order taylor approximations.
linear --> quadratic --> cubic.
 

Loki

Count of Concision
My bad: Riemann sums are used for graphically estimating the total space under a curve (i.e., integrals), not derivatives. The process I described, however, involving taking the slopes of smaller and smaller intervals about the point in question, still works-- it's just not called "Riemann sums." :D


But I won't edit it out of my post-- I'll leave it in there to show Diablos that there are, in fact, things that I don't know (or can't recall as well as I would like, at least :D).
 

7imz

Member
nitewulf said:
ok, few more questions, what level course is this, and have you done taylor approximations?
im fairly certain that you'd have to use the taylor method to solve the problem.
if it's an introductory course, then you could get away with using the linear approximations.
bear with me then,
pick a point, let's assume this point is (x1,y1), recall y=f(x1). draw a tangent line through this point and pick another point on the line, a very small distance away from it. now notice, the slope of the line that goes through these two points is
[y - f(x1)] / [x - x1], correct?
now recall that the tangent line is the slope of the particular function at that particular point,
so, the derivative of this function is equal to the slope (at that point)
[y - f(x1)] / [x - x1] = f' (f prime)
going from here, just solve for y
y = f(x1) + f'*[x - x1]
recall y = f(x)
so,
f(x) = f(x1) + f'*[x - x1]
this will only work if the graph is slow moving (ie, does not change drastically), if it does then you'd have to use higher order taylor approximations.
linear --> quadratic --> cubic.

thanks a lot for the help... it's a third year course and yes i've done taylor series, but it's been a while :s, i kinda forgot about them, and my damn friend has my calculus book
 

Loki

Count of Concision
How'd you end up making out with this, 7imz? Were you able to solve the problems? :)


(Don't mind me-- up all night reading and needed a break :p)
 

Dilbert

Member
7imz said:
i have this assignment where we have a graph of a function (i dont' have the function itself); i have to find estimates of derivates at specific points then use that to find the function... it's a numerical analysis course... any ideas?
I've been thinking about the bolded part of this problem, since I don't think it's been addressed so far. Coming up with the equation for a function -- given arbitrary points on the curve and first derivative values at that point -- doesn't ring a bell with me, although I've never taken a numerical methods class specifically. Is this really part of the problem, or did you just explain the problem poorly?

If you were given a graph, you MIGHT be able to come up with the equation based on an analysis of zeroes and discontinuities of the first derivative. In other words, where f'(x) = 0 or f'(x) = undefined (vertical asymptote), you can write an equation for f'(x) and then integrate. As an example, imagine the graph has slope zero where x = 4 and x = -5. We know that f'(x) = (x - 4)(x + 5) = 0, and can integrate to find that f(x) must be a cubic equation. By testing points, you can find the correct value for C (the integration constant) and verify that the general equation for f(x) works.

The problem, of course, is that not all zeroes are necessarily visible on a graph. Degenerate and complex zeroes can't be determined by inspection. For example, consider the equation x³ + x = 0. By the fundamental theorem of algebra, we know it has three roots...but only one of them is real. When you factor, you get x(x² + 1) = 0 -- the three roots are 0, +i, and -i.
 

bionic77

Member
Diablos said:
Loki, is there anything you don't know? I'm not saying this to be a smartass or insult you... I'm serious. You scare me. At least I can disagree with your politics sometimes.

He doesn't know jack about basketball. ;)
 

Soybean

Member
Amazing. Did everyone recall this from memory, or do they have their old books around? I was a math/computer science double major and I remember almost none of the math. I suck.
 

7imz

Member
-jinx- said:
I've been thinking about the bolded part of this problem, since I don't think it's been addressed so far. Coming up with the equation for a function -- given arbitrary points on the curve and first derivative values at that point -- doesn't ring a bell with me, although I've never taken a numerical methods class specifically. Is this really part of the problem, or did you just explain the problem poorly?

If you were given a graph, you MIGHT be able to come up with the equation based on an analysis of zeroes and discontinuities of the first derivative. In other words, where f'(x) = 0 or f'(x) = undefined (vertical asymptote), you can write an equation for f'(x) and then integrate. As an example, imagine the graph has slope zero where x = 4 and x = -5. We know that f'(x) = (x - 4)(x + 5) = 0, and can integrate to find that f(x) must be a cubic equation. By testing points, you can find the correct value for C (the integration constant) and verify that the general equation for f(x) works.

The problem, of course, is that not all zeroes are necessarily visible on a graph. Degenerate and complex zeroes can't be determined by inspection. For example, consider the equation x³ + x = 0. By the fundamental theorem of algebra, we know it has three roots...but only one of them is real. When you factor, you get x(x² + 1) = 0 -- the three roots are 0, +i, and -i.

i'm going to find the answer using cubic hermite piecewise polynomial approximation
 

Loki

Count of Concision
-jinx- said:
I've been thinking about the bolded part of this problem, since I don't think it's been addressed so far. Coming up with the equation for a function -- given arbitrary points on the curve and first derivative values at that point -- doesn't ring a bell with me, although I've never taken a numerical methods class specifically. Is this really part of the problem, or did you just explain the problem poorly?

If you were given a graph, you MIGHT be able to come up with the equation based on an analysis of zeroes and discontinuities of the first derivative. In other words, where f'(x) = 0 or f'(x) = undefined (vertical asymptote), you can write an equation for f'(x) and then integrate. As an example, imagine the graph has slope zero where x = 4 and x = -5. We know that f'(x) = (x - 4)(x + 5) = 0, and can integrate to find that f(x) must be a cubic equation. By testing points, you can find the correct value for C (the integration constant) and verify that the general equation for f(x) works.

The problem, of course, is that not all zeroes are necessarily visible on a graph. Degenerate and complex zeroes can't be determined by inspection. For example, consider the equation x³ + x = 0. By the fundamental theorem of algebra, we know it has three roots...but only one of them is real. When you factor, you get x(x² + 1) = 0 -- the three roots are 0, +i, and -i.

See Diablos, I told you -jinx- scares me. Be afraid, be very afraid. ;) :p


As for the rest, never mind-- I'd rather not think about, or speculate about, math today. Deleted for my own sanity. :p
 

Dilbert

Member
If you were given the graph of a polynomial function with the conditions that a) there were no degenerate or complex zeroes and b) all local extrema and asymptotes were shown in the pictured region of the function, then you could work out the exact function. As a general case, though, you'd have to resort to numerical methods as 7imz is doing.
 

Loki

Count of Concision
-jinx- said:
If you were given the graph of a polynomial function with the conditions that a) there were no degenerate or complex zeroes and b) all local extrema and asymptotes were shown in the pictured region of the function, then you could work out the exact function. As a general case, though, you'd have to resort to numerical methods as 7imz is doing.

So I take it you caught my post before I deleted it? :p Yeah, what you said above is pretty much what I figured, because it seemed that in your original post you were dealing with a more specific (and more complex) case than I'm used to seeing (having never advanced beyond calc 1 by choice :p)
 

nitewulf

Member
yeah, in real life situations you have to use the iterative numerical algorithms to approximate functions (or zeroes) as you wouldn't always have nice functions to work with. nice stuff only exists in math courses.
i haven't taken a numerical analysis course either, but i believe it's very useful for programmers.
another technique which always fascinated me is the newton iterative method to find zeroes of a function, very similar to the linear approximation, you draw tangent lines near the x intercept of a function and take it closer and closer to the zero itself. there is an error function associated with it which will show you if you are indeed going in the correct direction.
most of these algorithms are very useful for matlab programming and simulations.
here is a link that describes the newton-raphson method of approximating zeroes.
http://www.sosmath.com/calculus/diff/der07/der07.html
what's even more interesting is that ancient babylonians used similar techniques to find square roots.
 
Status
Not open for further replies.
Top Bottom