Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This is a follow-up question of: I need to define a family (one parameter) of monotonic curves

$x_0$, $y_0$ are known constants. What's the integral of this function?

$f(x, a) = \frac{y_0}{1+\frac{(1-a)x}{a(x_0-x)}}$

A few words on the function itself. For $x_0 = 1, y_0 = 1$, it looks the following diagram. We get a different curve for a different value of $a$, the straight line is when $a = 0.5$, the curves below are have $a < 0.5$ and the ones above have $a > 0.5$.

f(x, a)

Basically I need a function that I give it the total area to be covered, and the result is a value of $a$ that produces a curve covering that area. The valid areas are in $[0.0, x_0 * y_0]$. Some examples of this function $g$:

$g(0) = 0.0$ (when $a = 0.0$, the curve has zero area)

$g(x_0 * y_0) = 1.0$ (when $a = 1.0$, the curve has maximum area, the whole rectangle)

$g(0.5 * x_0 * y_0) = 0.5$ (when $a = 0.5$, the curve is a triangle)

I know, from tinkering with it, that the sought function has a sigmoidal shape like this:

Integral of f(x, a)/dx

(Horizontal axis is the value $a$, from $0.0$ to $1.0$, vertical axis is the area $R$, R for aRea)

My understanding is that I would need to integrate $f(x, a)$ (dx), get a closed formula involving $a, x_0, y_0, R$, and solve for $a$.

I admit that I was probably sleeping/absent when they taught me integration techniques in school and university. Any help much, much appreciated. I would also give a shot to wolfram alpha which has integration examples, but the problem is I have a couple of extra (fixed) parameters, and the syntax of it gives me trouble (or it only supports one symbolic name per function -- but that's unlikely)

share|improve this question
    
Just to be sure: you want $\int_0^1 f(x,a)\mathrm dx$? –  J. M. Oct 10 '11 at 2:56
2  
@J.M., the integration limits should surely be $0$ to $x_0$. However, substituting $u=x/x_0$ will get us back to the $[0,1]$ case while canceling out the use of $x_0$ in the definition. –  Henning Makholm Oct 10 '11 at 3:04
1  
In any event: you have a rational function as the integrand. If you perform partial-fraction decomposition on it, you can integrate and then obtain something involving logarithms. –  J. M. Oct 10 '11 at 3:05
    
@Henning: after seeing the previous question, I realized precisely that. :) –  J. M. Oct 10 '11 at 3:06
    
Sigh. I wish I understood what you are talking about :-/ –  Dimitris Andreou Oct 10 '11 at 3:23
add comment

1 Answer 1

up vote 2 down vote accepted

So I guess we want $$\large \int_0^{x_0}\frac{y_0}{1+\frac{(1-a)x}{a(x_0-x)}}dx.$$ Make the substitution $u=x/x_0$, multiply numerator and denominator by $a(1-u)$, $$y_0x_0\int_0^1\frac{a(1-u)}{a+(1-2a)u}du.$$ Now we want to use partial fraction decomposition, so we solve for $A$ and $B$ in $$\frac{a(1-u)}{a+(1-2a)u}=\frac{A}{a+(1-2a)u}+B.$$ We obtain the system $$\begin{cases}A+aB=a \\ B(1-2a)=-a\end{cases}$$ with solutions $$B=\frac{a}{2a-1};\quad A=\frac{a(a-1)}{2a-1}.$$ The integral becomes $$y_0x_0\int_0^1 \left(\frac{A}{a+(1-2a)u}+B\right)du $$ $$=y_0x_0\left(A\left[\frac{\log|a+(1-2a)u|}{1-2a}\right]_0^1+B\right)$$ $$=y_0x_0\left(\frac{a(1-a)}{(2a-1)^2}\log\left(\frac{1-a}{a}\right)+\frac{a}{2a-1}\right)$$ except when $a=1/2$. When $a=1/2$, we don't even need to use decomposition to evaluate $$y_0x_0\int_0^1(1-u)du=\frac{y_0x_0}{2}.$$

share|improve this answer
    
Thanks!! I have no idea what this partial fraction decomposition is, I'm glad you do, will try this tomorrow! –  Dimitris Andreou Oct 10 '11 at 6:03
    
Yep, matches my (manual) computations perfectly, awesome!: D –  Dimitris Andreou Oct 15 '11 at 22:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.