Integral and dx inside function

1. Sep 29, 2014

gabel

Im working on a problem whit the follewing integral:

$$I = \int|f(x+dx)dx|$$

Im trying to use int by parts : $$t = x + dx \Rightarrow dt/dx = 1 + ddx/dx = ?$$, but i have no idee on what ddx/dx is? I think dx -> konstant? so ddx/dx = 1 ?

2. Sep 29, 2014

Staff: Mentor

Is this exactly how the problem is presented? It doesn't look right to me.

3. Sep 29, 2014

Staff: Mentor

I don't think that integral is well-defined. Where does it come from?

4. Sep 29, 2014

gabel

I have to following expression:

dA = 2 f(x) dx + 0.5 | f(x-dx) | dx + 0.5 |f(x+da)|dx

5. Sep 29, 2014

Staff: Mentor

I'm guessing you're doing numerical integration using the trapezoid rule where each subinterval is of length 2$\Delta x$.

Why do you have absolute values on two of the terms, but not on the third?
Why do you have f(x - dx) in one place and f(x + da) in another?

If you're using the trapezoid rule to approximate an interval, the idea is to pick a value for n and actually add up some numbers, not do an integration.

When you post a question here you're supposed to use the problem template, the first part of which is a complete problem statement. If you had followed the forum guidelines, we wouldn't have wasted so much time trying to figure out what you're trying to do.

6. Sep 29, 2014

gabel

I'm using the shoelace formula (http://en.wikipedia.org/wiki/Shoelace_formula) for a triangle, and then letting

x_1 = x - dx , x_2 = x, x_3 = x + dx
y_1 = f(x-dx), y_2 = f(x), y_3 = f(x+dx).

Aften cleanup im left whit this
dA = 2 f(x) dx + 0.5 | f(x-dx) | dx + 0.5 |f(x+da)|dx

NB, latex is not working for me atm.

7. Sep 29, 2014

Staff: Mentor

It's still not clear to me what you're trying to do? Are you trying to find the area of a specific region? If so, you should have numeric values for x1, x2, and so on, as well as for y1, y2, and so on.

Please be more specific about what you're trying to do. From what I can tell, your formulas should NOT involve dx or da and you should not be trying to integrate things as you seem to be trying to do.

LaTeX works just fine, but when you click Post Reply, you should hit the browser's refresh button to see how it will appear. Or you could type your expression in the Preview LaTeX pane to test it first.

8. Sep 29, 2014

gabel

If i have a f(x) = ax+b, given 3 points on f(x), the area from those points shood be zero. Since they will always be on a line. But what heppens if f(x) = sin(x), cos(x), x^2, etc?

Some more details.

Red :f(x) = x
Blue:f(x) = x^2

A_2 = 0, A_1 = something small

Now i wanna move A_1 along the red function to se how A_1 behaves.

Im now thing of dx as the distance from A to B along x as dx, A to C as -dx etc for red funciton.

9. Sep 29, 2014

Staff: Mentor

You shouldn't use one letter, f, to mean two different things. The blue graph is, say, f(x) = x. The red graph is, say, g(x) = x2. You have the descriptions reversed.

On a straight line, if you connect any two points with a line segment, any point on the segment will also lie on the line. If you have a curve that isn't linear, and you draw a segment between two points on the curve, some points on the segment will not lie on the curve.

What does this mean?
A and C aren't on the red graph.The points you show are E, G, and F.

Why are you using the Shoelace formula? That formula gives the area of a polygon. Are you trying to find the area between a given curve and a line segment between two points on the curve?

10. Sep 29, 2014

gabel

Mod note: edited to show what I said and the responses.

Last edited by a moderator: Sep 29, 2014
11. Sep 29, 2014

Staff: Mentor

I don't see how convolution has anything to do with what you're trying to do.

Instead of seeing how an area "behaves" (meaningless because an area doesn't do anything), why not calculate the area between the curve and a straight line that connects two points on the curve. If you have a curve y = f(x) for a <= x <= b, the points (a, f(a)) and (b, f(b)) are on the curve and also determine a line segment.

The equation of the line is y = f(a) + [f(b) - f(a)]/(b - a) * (x - a).

The area between the line and the curve is
$$\int_a^b |f(x) - f(a) - \frac{f(b) - f(a)}{b - a}(x - a)|dx$$

If the line segment crosses the curve, it's possible for this forumula to result in zero. To avoid that happening, make sure that each line segment lies above the curve or below the curve.