# Homework Help: What's wrong with this approach? U-sub & IBP

1. Sep 8, 2015

### OhBoy

1. The problem statement, all variables and given/known data
∫ ex * sin(t-x) dx

2. Relevant equations
∫udv = uv - ∫vdu

3. The attempt at a solution
So I know the easiest way to do this is to just use IBP, and when you start with your original equation you can just use some Algebra to get the answer. But I was curious why this approach doesn't work.

u = ex, dx = du/ex
Now the original equation in terms of u:

∫sin(t-ln(u)) du = -cos(t-ln(u))/(-1/u) + C = ucos(t-ln(u)) + c = ex * cos(t-x) + C

I actually went this route on purpose on a quiz because I'm that type of guy who likes to use untraditional ways. Oh well. Any insight would be greatly appreciated!

2. Sep 8, 2015

### Geofleur

Integration by parts doesn't work so well here because it just shifts derivatives around inside the integrand, and taking a derivative of an exponential or sinusoidal function just gives back an exponential or sinusoidal function. If you like non-traditional methods, you could use the fact that $e^{i\theta} = \cos \theta + i \sin \theta$ to write $\sin \theta = (e^{i\theta}-e^{-i\theta})/2i$. Then use this result to get the integral solely in terms of exponential functions.

3. Sep 8, 2015

### OhBoy

Not quite sure I understand you. If you were going to take the integral of sin(1-x) you just take the integral of sin divided by the derivative of the parameter right (cos(1-x))? I'm just not quite sure why this doesn't apply when you put it in terms of U and do the same. I feel like this complies with the rules I was taught for U-sub, but maybe there's exceptions I wasn't taught yet and I'm breaking some type of logic here. Perhaps I'm missing some parameters required for u-sub?

Also, did you mean u-sub doesn't work here? IBP works fine.

4. Sep 8, 2015

### Geofleur

Oh - I see how IBP would work now. You eventually get the same integral showing up on the right hand side. OK. The way I was suggesting, using Euler's formula, would still work.

As to why u-sub didn't work, I will get back to you a little later (if someone else doesn't first)...

5. Sep 8, 2015

### Ray Vickson

Using integration by parts (is that what you mean by IBP?) twice does work; it gives you an equation involving your original integral on both sides, which can then be solved to get that integral. Back when I was studying integration that was a standard integration trick at the time.

6. Sep 8, 2015

### OhBoy

Is that what I did? Using my substitution of u = ex, I can replace dx with du/ex right? At the point you're only left with ∫sin(1-ln(u)) du. How would I go about this integral? I was thinking it'd be as straight forward as just dividing the derivative of the parameter. Though, seeing wolframalpha's answer I know I can't do this... So I guess I can only try integrating a trig function if there's one variable in the parameter and not another function? Should this also be reserved for power of 1 variables?

Thanks for the help.

7. Sep 8, 2015

### OhBoy

Yeah IBP is Integration by Parts.
I'm aware of how the IBP part works. I just like to know where I went wrong. I think I'm understanding why u-sub doesn't work.

Probably should've went the easy route. This was a 2 question quiz so now at most I can get a 50% on it lol. Probably should stick with the easy way, or at least write down both methods. But hey, at least I have a more intuitive understanding now than what I would've had if I avoided this method.

Last edited: Sep 8, 2015
8. Sep 8, 2015

### Ray Vickson

Your attempt failed because it used the wrong form of substitution. In general, we have
$$\int \sin( f(u)) \, du = \int \frac{\sin(v)}{f' \left(f^{-1}(v) \right)} \, dv$$
For $f(u) = t -\ln (u)$ this would give
$$\int \sin(t - \ln(u)) \, du = \int \sin(v) e^{t-v} \, dv$$

9. Sep 8, 2015

### RUber

After your u substitution, you were still left with a complicated function. You would still want to look for some substitution term that might help simplify that term, though it is not very clear what that might be.
If you are looking for an alternate solution, the only one I can see would be using the expansion that geofleur suggested in post #2. However, the time needed to get to the same solution would be much greater.

10. Sep 8, 2015

### OhBoy

What is v? And why are we dividing sin(v) by the derivative of the inverse of f of v? I think I'm missing some knowledge here.

11. Sep 8, 2015

### OhBoy

Yeah thanks. I think that particular alternative is over my head right now. So really the goal when integrating a function, like sin, cos, ln and what not, is when the parameter can be substituted into a single variable with a power no more than 1?

I think I need a lesson on the logic for why you can't just divide by the derivative of parameter with respect to your variable.

12. Sep 8, 2015

### RUber

Right. If you can't get it into a simple one-variable substitution, you should look for alternate methods.

13. Sep 8, 2015

### OhBoy

Thanks. I edited my previous reply and I'm sort of expecting a complicated answer I probably won't comprehend but I'm curious. I like to be able to 'feel' the answer and feel like I really understand it. I can easily take this advice at face value and do just fine, but I'm curious of the reasoning and logic behind why it's not valid. Probably not going to be easy to see the full scope of these operations but it doesn't hurt to try, right?

14. Sep 8, 2015

### OhBoy

I think I'm over-complicating this. I think I forgot the only reason you end up dividing by the derivative of the inside is because of a u-sub that works and replaces the parameter with a single variable. I'm at that awkward moment where I'm not sure if I get it but I'm not sure of any questions to ask either... Though Ray, further explanation on your post would be appreciated. I don't remember ever seeing that format. Not quite sure how you rewrote the integral to get it in that form.

15. Sep 8, 2015

### RUber

Notice that if you take the derivative of your answer, using the product rule, you get:
$\frac{d}{dx}e^x \cos(t-x)= e^x \sin(t-x) + e^x \cos(t-x)$.
This is not what you want. However, it might provide a clue. If you look at what happens when you take the derivative of $e^x sin(t-x),$ you will see that it is $\frac{d}{dx}e^x sin(t-x)= -e^x \cos(t-x) + e^x \sin(t-x)$.
Now, it might be pretty clear that if you add these together, you will get rid of the cosine terms in the denominator, and have $\frac{d}{dx}\left(e^x \cos(t-x)+ e^x sin(t-x) \right) = 2e^x sin(t-x)$, which is very close to (constant multiple of) the function you are trying to integrate.

As for why your substitution didn't work, it is simply that you had a function inside a function. As Ray pointed out, another substitution would be called for, and that would leave you with almost the same thing.
$e^t \int e^{-v } \sin v \, dv$

16. Sep 8, 2015

### OhBoy

Woah. Why I didn't take the derivative of my answer during the quiz to check it is beyond me..

So, I'm taking it that taking the integral of a function is only doable when the parameter is a single variable, because we don't have access to the process by which the function operates? So if we had f(x) = x^2 + x, pretending that we don't know how f(x) is defined but we do have g(x) which is F(x), , integrating is straight forward, ∫f(x)dx = g(x) but with f(x^2 + 2) = (x^4+4x^2 + 2), there's no way to get the integral of the function by just using it's parameter(s). I think I'm understand it a lot better. Probably should have just sat on this a bit longer. All this time I was just kinda of plugging and chugging u-subs without thinking about the actual reasoning behind it.

Last edited: Sep 8, 2015
17. Sep 8, 2015

### FeDeX_LaTeX

He made the substitution $v = f(u)$, then used the fact that $(f^{-1})'(v) = \frac{1}{f'(f^{-1}(v))}$.

18. Sep 8, 2015

### OhBoy

Sorry for the questions, but why is the inverse derivative of f(u) being involved?

Edit: Sorry disregard. Did it on paper. It's just notation to get v in terms of u. Not used to all of this formal format.

Last edited: Sep 8, 2015
19. Sep 8, 2015

### Ray Vickson

$v = f(u)$

As to why $f'$ is involved: that is a standard formula in calculus. But, if you want to derive it for yourself, just do the change of variables in
$$\int F(f(u)) \, du$$
to $v = f(u)$. Then, how do you get $du$ in terms of $v$ and $dv$?

Last edited: Sep 8, 2015
20. Sep 8, 2015

### OhBoy

I gotcha. I was initially confused when I saw the inverse function. I'm familiar with going through the process I just never recognized it as such with that notation.

21. Sep 8, 2015

### vela

Staff Emeritus
It seems you've figured it out already, but I'll comment anyway. If you use the substitution $v = t-\ln u$, you have $dv = -du/u$, and the integral becomes
$$\int \sin(t-\ln u)\,du = \int (-u)\sin v\,dv.$$ However, in your attempt, you ended up with
$$(-u) \int \sin v\,dv = -u (-\cos v) = u \cos(t-\ln u)$$. You effectively pulled the $u$ out of the integral, which you can't do because it depends on $v$.