Finding the intergral function (dy/dt = a(q-y))

  • Thread starter miniradman
  • Start date
  • Tags
    Function
In summary: I'm not sure if that will work or not.That sounds like a good plan. Try differentiating each function by itself and then combining them. That seems like a good way to go about it.
  • #1
miniradman
196
0

Homework Statement


I was working on an assignment and when I got my draft back, my teacher said I've made some errors working this out, however I'm not sure what I did wrong...

Find the intergral function of:
dy/dt=a(q-y) where t ≥0, y(0)=0 a and q are constants.


Homework Equations





The Attempt at a Solution



[itex]\frac{dy}{dt}[/itex]=a(q-y)

[itex]\frac{dy}{}[/itex]=a(q-y)dt

[itex]\frac{dy}{(q-y)}[/itex]=adt

[itex]\int\frac{dy}{(q-y)}[/itex]=[itex]\int adt[/itex]

ln(q-y)=at+c

q-y=eat+ec where: ec is a constant so let it = A

q-y=Aeat

-y=Aeat-q

[itex]\frac{-y}{-1}[/itex]= -(Aeat) [itex]\frac{ (-q)}{-1}[/itex]

y= -Aeat+ q

∴ y= -Aeat+ q

Can anyone see any mistakes?
 
Physics news on Phys.org
  • #2
miniradman said:
[itex]\int\frac{dy}{(q-y)}[/itex]=[itex]\int adt[/itex]

ln(q-y)=at+c

Your mistake was in converting from the first to the next statement. Try and think where the mistake is.

Hint: What is the derivative of ln[f(x)]?
 
  • #3
I know the derivative of ln(x) to be

[itex]\frac{1}{x}[/itex]
 
Last edited:
  • #4
The derivative of ln[f(x)] is f'(x)/f(x), where f'(x) is the derivative of f(x) with respect to x.

Substitute f(x) = x into this formula to convince yourself that the formula I wrote is a generalisation of the derivative of ln(x).

Then try to work out the derivative of ln(q-y), where q is a constant.
 
  • #5
wow... why must I divide the derivative function by the original function?
 
  • #6
You mean 'why must I divide the derivative function by the original function to obtain the derivative of ln[f(x)]?

I think you are asking why f'(x)/f(x) has to be the derivative of ln[f(x)]. This is a very theoretical question, and as such it is unlikely to come up in your tests. But just so you know, that formula can be obtained by considering the mother of all formulas you have ever studied in differentiation. It is this:

[itex]\frac{dg}{dx} = \underbrace{lim}_{h \rightarrow 0} \frac{g(x+h) - g(x)}{(x+h) - (x)}[/itex], where [itex]\frac{dg}{dx}[/itex] is the derivative of a function g(x) with respect to x.

This is the fundamental definition of the differentiation of a function and all other formulas that you have learned can be obtained by using this mother of all formulas. For instance, to obtain the derivative of ln[f(x)], substitute g(x) = ln[f(x)] in that fundamental definition and work out the result. The result has to be f'(x)/f(x).

On a more practical note, d/dx { ln[f(x)] } = f'(x)/f(x) means that d/dx { ln(x) } = ?

Try to work out the answer and then find d/dy { ln(q-y)}.
 
  • #7
I've always had trouble deriving by first principles, could I use the chain rule?

let ln(q-y)=ln u?

where u = (q-y) where q is constant

then

[itex]\frac{d}{dy}[/itex] = [itex]\frac{d}{du}[/itex] x [itex]\frac{du}{dy}[/itex] ?
 
Last edited:
  • #8
miniradman said:
I've always had trouble deriving by first principles, could I use the chain rule?

let ln(q-y)=ln u?

where u = (q-y) where q is constant

then

[itex]\frac{d}{dy}[/itex] = [itex]\frac{d}{du}[/itex] x [itex]\frac{du}{dy}[/itex] ?

Oh no! Don't try to find d/dy { ln(q-y) } using first principles. I elaborated on first principles just to answer your question on why you must divide the derivative function by the original function to obtain the derivative of ln[f(x)].

Anyway, by the looks of your last post, you appear comfortable with the topic of differentiation, so try the chain rule.

And you can check that you will get the same answer if you use d/dx { ln[f(x)] } = f'(x)/f(x).
 
  • #9
so.

d/du = 1/u

du/dy = -1?

d/dy = 1/(q-y) x -1

d/dy = -1/q-y

errr... this can't be right, can it?
 
  • #10
miniradman said:

Homework Statement


I was working on an assignment and when I got my draft back, my teacher said I've made some errors working this out, however I'm not sure what I did wrong...

Find the intergral function of:
dy/dt=a(q-y) where t ≥0, y(0)=0 a and q are constants.


Homework Equations





The Attempt at a Solution



[itex]\frac{dy}{dt}[/itex]=a(q-y)

[itex]\frac{dy}{}[/itex]=a(q-y)dt

[itex]\frac{dy}{(q-y)}[/itex]=adt

[itex]\int\frac{dy}{(q-y)}[/itex]=[itex]\int adt[/itex]

ln(q-y)=at+c

q-y=eat+ec where: ec is a constant so let it = A

q-y=Aeat

-y=Aeat-q

[itex]\frac{-y}{-1}[/itex]= -(Aeat) [itex]\frac{ (-q)}{-1}[/itex]

y= -Aeat+ q

∴ y= -Aeat+ q

Can anyone see any mistakes?

Do you know how to do integration by substitution?
 
  • #11
that would not be ln(q-y). it will be -
 
  • #12
RoshanBBQ said:
Do you know how to do integration by substitution?
Nope, I've only learn the basic rules for intergrating trigonometric and basic polynomials (i.e. f(x)). Also the basic rule for intergrating 1/x which equals lnx

Also the method that I used in my opening post... which I guess hasn't gotten me anywhere =D
 
  • #13
miniradman said:
Nope, I've only learn the basic rules for intergrating trigonometric and basic polynomials (i.e. f(x)). Also the basic rule for intergrating 1/x which equals lnx

Also the method that I used in my opening post... which I guess hasn't gotten me anywhere =D

Consider
[tex]\int \frac{1}{q-y}dy[/tex]
Let
[tex]u = q-y[/tex]
Then
[tex]\frac{du}{dy} = -1\rightarrow dy = -du[/tex]

We then substitute using q-y = u and dy = -du
[tex]\int \frac{1}{u} \left (-du \right )=-\int \frac{1}{u} du[/tex]
Once you accomplish the integration, treating u just like you'd treat x, you replace any u in your answer with q-x.
 
  • #14
RoshanBBQ said:
Consider
Then
[tex]\frac{du}{dy} = -1\rightarrow dy = -du[/tex]
Hmmm, why in this case are we deriving du/dy? instead of dy/du?
 
  • #15
miniradman said:
Hmmm, why in this case are we deriving du/dy? instead of dy/du?

It doesn't matter which one you do (if you can do both easily). When you do a U-substitution, though, you will write

u = f(y)

So it makes sense to differentiate with respect to y. You then get du/dy = f'(y).
 
  • #16
Ok mate, you've lost me
RoshanBBQ said:
Consider
[tex]\int \frac{1}{q-y}dy[/tex]
Let
[tex]u = q-y[/tex]
Then
[tex]\frac{du}{dy} = -1\rightarrow dy = -du[/tex]
.

If:
[tex]\int \frac{1}{q-y}dy[/tex]
Let
[tex]u = q-y[/tex]

then

[tex]\int \frac{1}{u}dy[/tex] right?

So why doesn't...

d = lnu y

because [itex]\int dy[/itex] = y and [itex]\int\frac{1}{u}[/itex] = ln u ?

Where is my mistake?
 
  • #17
miniradman said:
so.

d/du = 1/u

du/dy = -1?

d/dy = 1/(q-y) x -1

d/dy = -1/q-y

errr... this can't be right, can it?
Other than your abuse of notation, what you wrote is correct. So if f(y) = ln (q-y), you have that f'(y) = -1/(q-y). You can use this information to solve
$$\int\frac{1}{q-y}\,dy = \int -f'(y)\,dy = \ ?$$
 
  • #18
miniradman said:
Ok mate, you've lost meIf:
[tex]\int \frac{1}{q-y}dy[/tex]
Let
[tex]u = q-y[/tex]

then

[tex]\int \frac{1}{u}dy[/tex] right?

So why doesn't...

d = lnu y

because [itex]\int dy[/itex] = y and [itex]\int\frac{1}{u}[/itex] = ln u ?

Where is my mistake?

You can't integrate u with respect to y like that. You have to also substitute out the dy so that it is in terms of du. When you do this substitution, it introduces the negative sign.

When you solve for this substitution, you write

[tex]u = f(y)[/tex]
[tex]\frac{du}{dy} = f'(y)[/tex]

Now, at this point, it is important to note we are treating du/dy like division of two regular variables. In the case where f'(y) is simply a constant (here, it is -1), it is simplest to just multiply dy over and divide the constant over, resulting in
[tex]dy = \frac{du}{f'(y)}= \frac{du}{-1} = -du[/tex]

We then replace the "dy" in the original equation with "-du" since we established this equivalence. You can then integrate your 1/u with respect to u, which is important.

Maybe another example will help you see the process:
[tex] \int xe^{x^2} dx[/tex]

So the trick with u substitution is you can take out an entire f'(x)dx and replace it with a single du.

Let
[tex]u = x^2[/tex]
[tex]\frac{du}{dx} = 2x \rightarrow du = 2xdx[/tex]

We then proceed with the substitution. Let's do it slowly so you can see each effect separately. Let's put in the u first:
[tex]\int e^u xdx[/tex]

Now, if only there were a 2 in there, the 2xdx would equal du. We can do the good old fashioned constant/constant = 1 trick:

[tex]\int e^u \frac{2}{2}xdx = \frac{1}{2} \int e^u 2xdx[/tex]

We now see we have the 2xdx = du. Let's replace that now

[tex]\frac{1}{2}\int e^u du = \frac{1}{2} e^u[/tex]

Finally, we replace u = x^2. That is our original substitution.

[tex]\int xe^{x^2} dx=\frac{1}{2} e^{x^2}[/tex]

As an exercise, you could try differentiating that final equation to see it equals the original integrand.

Maybe you could try (using u substitution)

[tex]\int \frac{x^2}{x^3-1}dx[/tex]
 
Last edited:
  • #19
RoshanBBQ said:
Maybe you could try (using u substitution)

[tex]\int \frac{x^2}{x^3-1}dx[/tex]

Alright, I'll have a crack at this one...[tex]\int \frac{x^2}{x^3-1}dx[/tex]

Let u = x3-1 So:

[tex]\int \frac{x^2}{u}dx[/tex]

Then:

[itex]\int x^2 × \frac{1}{u}[/itex]

[itex] \frac{x^3}{3} × lnu [/itex]

Sub in [itex]u = x^3 -1 [/itex]

Therefore

[itex]\int \frac{dy}{dx} = \frac{x^3}{3}ln x^3 -1 [/itex]
 
Last edited:
  • #20
It will help to look more clinically on what's on your paper:

[itex] \int \frac{x^2}{x^3-1} dx = \int \frac{x^2 dx}{x^3-1}[/itex]

Now sub [itex] x^3 -1 [/itex] with [itex]u[/itex].

This means you got [itex] u = x^3 -1[/itex] and also [itex] du = 3x^2dx [/itex] which means that [itex] \frac{du}{3} = \frac{1}{3} du =x^2 dx [/itex]

Now look at your integrand, and become excited, since the right side of the equation over looks much like something in your integrand, now sub the [itex]x^2 dx[/itex] with [itex] \frac{1}{3}du[/itex] and you got:

(I'm sure you can figure out the rest from here, but I will put the rest in spoiler)

Moderator note: Even though this is just a practice problem, I removed the solution. It's against the forum rules to provide complete solutions.
 
Last edited by a moderator:
  • #21
miniradman said:
Alright, I'll have a crack at this one...


[tex]\int \frac{x^2}{x^3-1}dx[/tex]

Let u = x3-1 So:

[tex]\int \frac{x^2}{u}dx[/tex]

Then:

[itex]\int x^2 × \frac{1}{u}[/itex]

[itex] \frac{x^3}{3} × lnu [/itex]

Sub in [itex]u = x^3 -1 [/itex]

Therefore

[itex]\int \frac{dy}{dx} = \frac{x^3}{3}ln x^3 -1 [/itex]

When you do U-substitution, you generally cannot have ANY of the original variable in the new integral. Integrating a term with x and u in it with respect to du (or dx) has little intuitive meaning. You must substitute it all out by using your definition of u and your definition of du/dx. Treat du/dx like a/b (two variables divided).
 
  • #22
Noorac said:
Now look at your integrand, and become excited, since the right side of the equation over looks much like something in your integrand, now sub the [itex]x^2 dx[/itex] with [itex] \frac{1}{3}du[/itex] and you got:
I follow everything up to, but not including this step.

If:
[itex]\frac{du}{dx} = 3x^2 [/itex]
[itex] du = 3x^2 dx [/itex]
[itex]\frac{du}{3} = x^2 dx [/itex]

So [itex]x^2[/itex] can be replaced with [itex]\frac{du}{3}[/itex]

Do I simply sub in [itex]\frac{du}{3}[/itex] from there?

RoshanBBQ said:
When you do U-substitution, you generally cannot have ANY of the original variable in the new integral. Integrating a term with x and u in it with respect to du (or dx) has little intuitive meaning. You must substitute it all out by using your definition of u and your definition of du/dx. Treat du/dx like a/b (two variables divided).
I'm not exactly sure what is meant in blue :confused:
So I shouldn't really have the [itex]-1[/itex] in there?
 
Last edited:
  • #23
miniradman said:
I follow everything up to, but not including this step.

If:
[itex]\frac{du}{dx} = 3x^2 [/itex]
[itex] du = 3x^2 dx [/itex]
[itex]\frac{du}{3} = x^2 dx [/itex]

So the red parts match

[itex]\int\frac{x^2}{u}[/itex]

Do I simply sub in [itex]\frac{du}{3}[/itex] from there?I'm not exactly sure what is meant in blue :confused:
So I shouldn't really have the [itex]-1[/itex] in there?
You integrated

[tex]\int \frac{x^2}{u}dx[/tex]

So you have an x^2, a u, and you're integrating with respect to a x (because of the dx). You need to have the integrand have only u and you need to integrate with respect to u (meaning du and no dx). The trick is in differentiating your substitution with respect to the variable in the original integral, e.g.

[tex]\frac{du}{dx} = 3x^2[/tex]

You can solve for du here as if it were any other variable.

And to answer your other question, yes, you replace "x^2dx" in the original integral with "du/3". You established the equivalence after all.
 
Last edited:
  • #24
Which would become... [itex]du = 2x^2 dx[/itex] ?
 
  • #25
miniradman said:
Which would become... [itex]du = 2x^2 dx[/itex] ?

Yes, if I hadn't made a horribly basic mistake {du/dx = 3x^2 not 2x^2}. It will be du = 3x^2dx. But with constants and substitutions, there are many games you can play. As you can see by looking at the integral at this point:

[tex]\int \frac{x^2}{u}dx[/tex]

you want to get rid of a

[tex]x^2dx[/tex]

So, as Noorac showed, you can just solve for that chunk:

[tex]du = 3x^2dx \rightarrow \frac{du}{3} = x^2dx[/tex]

Now you can replace "x^2dx" in the original integral with "du/3". It is mathematically equivalent.
 
Last edited:
  • #26
RoshanBBQ said:
Now you can replace "x^2dx" in the original integral with "du". It is mathematically equivalent.
:rolleyes: I thought is was [itex] \frac{du}{3}[/itex] rather than simply [itex]du[/itex] (unless that was what you meant by "du")... then:

[itex]\int\frac{\frac{du}{3}}{u}[/itex]

[itex]\int \frac{1}{u} × \frac{du}{3}[/itex]

[itex]\int \frac{1}{u} × \frac{1}{3} du[/itex]

Damn!... I'm stuck again :frown:
 
  • #27
miniradman said:
:rolleyes: I thought is was [itex] \frac{du}{3}[/itex] rather than simply [itex]du[/itex] (unless that was what you meant by "du")... then:

[itex]\int\frac{\frac{du}{3}}{u}[/itex]

[itex]\int \frac{1}{u} × \frac{du}{3}[/itex]

[itex]\int \frac{1}{u} × \frac{1}{3} du[/itex]

Damn!... I'm stuck again :frown:

No that's right. I made another silly mistake, though I caught it faster this time.
 
  • #28
Hello.

miniradman said:
Can anyone see any mistakes?

[itex]\frac{dy}{dt}=a(q-y)[/itex]

[itex]\frac{dy}{(q-y)}=adt[/itex]

[itex]\int\frac{dy}{q-y}=\int adt[/itex]

[itex]-ln|y-q|=at+c[/itex]

[itex]|y-q|=C_1e^{-at}[/itex]

y=C e-at + q

Regards.
 
  • #29
copy + paste ... just kidding.

No that's right. I made another silly mistake, though I caught it faster this time.
So do I just multiply the two fractions together and sub in the original [itex]x^3 - 1 [/itex]?
 
  • #30
miniradman said:
copy + paste ... just kidding.


So do I just multiply the two fractions together and sub in the original [itex]x^3 - 1 [/itex]?

You take the integral of

[tex]\int \frac{1}{u}\frac{du}{3} = \frac{1}{3} \int \frac{1}{u} du[/tex]

Remember, integrals are like summations. Just like a/3 + b/3 = (a+b)/3, in an integral, constants can be factored out of the infinite summation. So the 1/3 just comes right out. And yes, after the integration, just replace u with x^3 -1.
 
  • #31
Hi. Relevant integral formula is

[tex] \int\frac{1}{x} dx = ln |x|+C [/tex]

You can easily check validation by differentiating formula. Regards.
 
Last edited:
  • #32
Alrighty...

[itex]\normalsize \frac{1}{3} \int \frac{1}{u} du[/itex]

[itex]\normalsize \frac{1}{3} ln u[/itex]

sub [itex]\normalsize u = x^3 - 1[/itex] So:

[itex]\normalsize\frac{1}{3} ln |x^3 - 1|+ c[/itex]

or

[itex]\normalsize\frac{ln |x^3 -1|}{3} + c[/itex]

Ok, I think I'm ready to tacking the original question using the u substitution (you're probably think "gosh, finally!")

ok.

[itex]\normalsize \frac{dy}{dt} = a(q-y) [/itex]

[itex]\normalsize \frac{dy}{q-y} = a dt [/itex]

let [itex] u = (q -y) [/itex]

So: [itex]\normalsize \frac{du}{dy} = 0 - 1 [/itex]

[itex]\normalsize du = - dy [/itex]

[itex]\normalsize \int \frac{dy}{u} = \int a dt [/itex]

[itex]\normalsize \int \frac{1}{u} dy = \int a dt [/itex]

sub in [itex]- du[/itex]

[itex]\normalsize - \int \frac{1}{u} du = \int a dt [/itex]

[itex]\normalsize - ln |u| = at + c[/itex]

[itex]\normalsize ln |u| = (-at - c)[/itex]

sub in the u value [itex]q - y[/itex]

[itex]\normalsize - ln |q - y| = at + c[/itex] (what sweet springs had!)

[itex]\normalsize ln |q - y| = -at - c[/itex]

[itex]\normalsize |q - y| = e^{-at-c}[/itex]

[itex]\normalsize |q - y| = e^{-at} × e^{-c}[/itex]

[itex]\normalsize - y = e^{-at} × e^{-c} -q[/itex]

[itex]\normalsize y = (e^{-at} × e^{-c} -q) \div -1[/itex]

[itex]\normalsize y = -e^{-at} × -e^{-c} + q[/itex]

[itex]\normalsize y = e^{-at} × e^{-c} + q[/itex] (negative multiplied by negative make positive)

Let [itex]e^-c = A[/itex] (A is just what we use at school to conform with the standard exponential form of: [itex]y = Ae^{Bt} + C[/itex]

[itex]\normalsize y = Ae^{-at} + q[/itex]

I'm guessing that's the end of it. YAY! :approve:

Aaand I did it all by myself... jokes :biggrin:

I'm sorry for being such a pain to teach and I swear I've never had this much trouble understanding a concept (well, I don't usually have this much trouble anyway :biggrin:)

Thank you; Failexam, RoshanBBQ, Vela, Noorac and sweet springs... miniradman is forever in your debt :smile:

Thanks again!
 
Last edited:
  • #33
miniradman said:
...
Ok, I think I'm ready to tackling the original question using the u substitution (you're probably think "gosh, finally!")

ok.

[itex]\normalsize \frac{dy}{dt} = a(q-y) [/itex]

[itex]\normalsize \frac{dy}{q-y} = a dt [/itex]

let [itex] u = (q -y) [/itex]

So: [itex]\normalsize \frac{du}{dy} = 0 - 1 [/itex]

[itex]\normalsize du = - dy [/itex]

[itex]\normalsize \int \frac{dy}{u} = \int a dt [/itex]

[itex]\normalsize \int \frac{1}{u} dy = \int a dt [/itex]

sub in [itex]- du[/itex]

[itex]\normalsize - \int \frac{1}{u} du = \int a dt [/itex]

[itex]\normalsize - ln |u| = at + c[/itex]

[itex]\normalsize ln |u| = (-at - c)[/itex]

sub in the u value [itex]q - y[/itex]

[itex]\normalsize - ln |q - y| = at + c[/itex] (what sweet springs had!)

[itex]\normalsize ln |q - y| = -at - c[/itex]

[itex]\normalsize |q - y| = e^{-at-c}[/itex]

[itex]\normalsize |q - y| = e^{-at} × e^{-c}[/itex]

[itex]\normalsize - y = e^{-at} × e^{-c} -q[/itex]

[itex]\normalsize y = (e^{-at} × e^{-c} -q) \div -1[/itex]

[itex]\normalsize y = -e^{-at} × -e^{-c} + q[/itex]

[itex]\normalsize y = e^{-at} × e^{-c} + q[/itex] (negative multiplied by negative make positive)

Let [itex]e^-c = A[/itex] (A is just what we use at school to conform with the standard exponential form of: [itex]y = Ae^{Bt} + C[/itex]

[itex]\normalsize y = Ae^{-at} + q[/itex]

I'm guessing that's the end of it. YAY! :approve:

Aaand I did it all by myself... jokes :biggrin:

I'm sorry for being such a pain to teach and I swear I've never had this much trouble understanding a concept (well, I don't usually have this much trouble anyway :biggrin:)

Thank you; Failexam, RoshanBBQ, Vela, Noorac and sweet springs... miniradman is forever in your debt :smile:

Thanks again!
Almost:
[itex]\displaystyle (e^{-at} × e^{-c})\div(-1)=-e^{-at} × e^{-c}\ .[/itex]

There is no distributive law for division over multiplication. (A positive times a positive divided by a negative results in a negative.)

Also, use the given conditions to evaluate c, or A. In particular, y(0) =0, and t ≥ 0 .
 
  • #34
So then shouldn't the final function be ?

[itex]y = -Ae^{-at} + q[/itex]
 
  • #35
I don't know, but I do want to bring up an important point. Since you didn't know U-substitution, you were probably supposed to do it another way. The only way I can see you doing it is to just think it out. Ask yourself, "What could I differentiate to equal 1/(q-y)"? If you 1.) remember that the derivative of ln(x) is 1/x and 2.) remember chain rule, you can brute force the answer using your human mind.

Is that what they're teaching you right now?
 
Back
Top