MHB Why Isn't y Treated as a Constant in the Product Rule?

find_the_fun
Messages
147
Reaction score
0
Find the gernal solution of [math]cosx\frac{dy}{dx}+(sinx)y=1[/math]

So [math]\frac{dy}{dx}+\frac{sinx}{cosx}y=\frac{1}{cosx}[/math]
[math]\frac{dy}{dx}+tan(x)y=csc(x)[/math] therefore [math]P(x)=tan(x)[/math]
Let [math]\mu (x) = e^{\int P(x) dx}=e^{\int tan(x) dx} =\frac{1}{cosx}[/math]

multiply both sides of the equation by integrating factor
[math]\frac{dy}{dx} \frac{1}{cosx}+y\frac{tanx}{cosx}=\frac{1}{cos^2x}[/math]

[math]\frac{d}{dx}[\mu(x)y]=\frac{d}{dx}[\frac{1}{cosx}y][/math] use product rule [math](\frac{1}{cosx})'y+\frac{1}{cosx}y'=\frac{tanx}{cosx}y+\frac{1}{cosx}\frac{dy}{dx}[/math]

Question 1: how come when we use the product rule and take the derivative of y with respect x we get [math]\frac{dy}{dx}[/math] and not 0? I say 0 because the derivative of a constant is 0 and aren't we treating y as a constant?

Next step: integrate

[math]\int \frac{d}{dx}[\frac{1}{cosx}y]dx = \int \frac{1}{cosx} x[/math]
[math]\frac{y}{cosx}=\ln{|-cosx|}+C[/math]
and [math]y=\ln{|-cosx|}cosx+Ccosx[/math]

Question 2: the back of book has [math]y=sinx+Ccosx[/math] Where did sin(x) come from?
 
Physics news on Phys.org
Re: first order linear equation

This is how I would work the problem, and I hope to answer your questions along the way.

First, write the ODE in standard linear form:

$$\frac{dy}{dx}+\tan(x)y=\sec(x)$$

Compute the integrating factor:

$$\mu(x)=e^{\int\tan(x)\,dx}=\sec(x)$$

Hence, we find:

$$\sec(x)\frac{dy}{dx}+\sec(x)\tan(x)y=\sec^2(x)$$

Since $y$ is a function of $x$, when it is differentiated with respect to $x$, we cannot treat it as a constant, so we must write $$\frac{dy}{dx}$$. Thus, the left side is the differentiation of a product.

$$\frac{d}{dx}\left(\sec(x)y \right)=\sec^2(x)$$

Integrating with respect to $x$, we find:

$$\sec(x)y=\tan(x)+C$$

Multiply through by $\cos(x)$ (observing that $$\tan(x)\cos(x)=\frac{\sin(x)}{\cos(x)}\cos(x)=\sin(x)$$):

$$y(x)=\sin(x)+C\cos(x)$$

And this is our general solution.
 
Re: first order linear equation

How do you integrate [math]\sec^2(x)[/math] to get [math]\tan(x)+C[/math]?
 
Re: first order linear equation

find_the_fun said:
How do you integrate [math]\sec^2(x)[/math] to get [math]\tan(x)+C[/math]?

This comes from:

$$\frac{d}{dx}\left(\tan(x)+C \right)=\sec^2(x)$$
 
Re: first order linear equation

find_the_fun said:
Find the gernal solution of [math]cosx\frac{dy}{dx}+(sinx)y=1[/math]

So [math]\frac{dy}{dx}+\frac{sinx}{cosx}y=\frac{1}{cosx}[/math]
[math]\frac{dy}{dx}+tan(x)y=csc(x)[/math] therefore [math]P(x)=tan(x)[/math]
Let [math]\mu (x) = e^{\int P(x) dx}=e^{\int tan(x) dx} =\frac{1}{cosx}[/math]

multiply both sides of the equation by integrating factor
[math]\frac{dy}{dx} \frac{1}{cosx}+y\frac{tanx}{cosx}=\frac{1}{cos^2x}[/math]

[math]\frac{d}{dx}[\mu(x)y]=\frac{d}{dx}[\frac{1}{cosx}y][/math] use product rule [math](\frac{1}{cosx})'y+\frac{1}{cosx}y'=\frac{tanx}{cosx}y+\frac{1}{cosx}\frac{dy}{dx}[/math]

Question 1: how come when we use the product rule and take the derivative of y with respect x we get [math]\frac{dy}{dx}[/math] and not 0? I say 0 because the derivative of a constant is 0 and aren't we treating y as a constant?

To answer this question: we're not treating $y$ as a constant. We are treating $y=y(x)$ as a function of $x$, in which case we must use the chain rule.
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top