First order linear equation

In summary: The derivative of a function is the rate of change of the function with respect to the variable on the right-hand side. In the context of this problem, this means that we are taking the derivative of the function $y=y(x)$ with respect to $x$.
  • #1
find_the_fun
148
0
Find the gernal solution of \(\displaystyle cosx\frac{dy}{dx}+(sinx)y=1\)

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

multiply both sides of the equation by integrating factor
\(\displaystyle \frac{dy}{dx} \frac{1}{cosx}+y\frac{tanx}{cosx}=\frac{1}{cos^2x}\)

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

Question 1: how come when we use the product rule and take the derivative of y with respect x we get \(\displaystyle \frac{dy}{dx}\) 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

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

Question 2: the back of book has \(\displaystyle y=sinx+Ccosx\) Where did sin(x) come from?
 
Physics news on Phys.org
  • #2
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:

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

Compute the integrating factor:

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

Hence, we find:

\(\displaystyle \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 \(\displaystyle \frac{dy}{dx}\). Thus, the left side is the differentiation of a product.

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

Integrating with respect to $x$, we find:

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

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

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

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

How do you integrate \(\displaystyle \sec^2(x)\) to get \(\displaystyle \tan(x)+C\)?
 
  • #4
Re: first order linear equation

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

This comes from:

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

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

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

multiply both sides of the equation by integrating factor
\(\displaystyle \frac{dy}{dx} \frac{1}{cosx}+y\frac{tanx}{cosx}=\frac{1}{cos^2x}\)

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

Question 1: how come when we use the product rule and take the derivative of y with respect x we get \(\displaystyle \frac{dy}{dx}\) 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.
 

Related to First order linear equation

1. What is a first order linear equation?

A first order linear equation is a mathematical equation that describes a relationship between two variables, where both variables are raised to the first power and the equation can be written in the form y = mx + b. It is called a linear equation because when graphed, it forms a straight line.

2. How do you solve a first order linear equation?

To solve a first order linear equation, you need to isolate the variable on one side of the equation. This can be done by using inverse operations, such as addition, subtraction, multiplication, and division, to cancel out any constants or coefficients attached to the variable. The final result will be the value of the variable.

3. What is the slope of a first order linear equation?

The slope of a first order linear equation is the coefficient (m) of the variable. It represents the rate of change of the dependent variable (y) with respect to the independent variable (x). A positive slope indicates a positive relationship, where the variables increase together, and a negative slope indicates an inverse relationship, where one variable decreases as the other increases.

4. What is the y-intercept of a first order linear equation?

The y-intercept of a first order linear equation is the constant term (b) of the equation. It is the point where the graph intersects with the y-axis. It represents the initial value of the dependent variable when the independent variable is equal to zero. In other words, it is the value of y when x = 0.

5. Where are first order linear equations used in science?

First order linear equations are commonly used in science to describe relationships between different variables. They can be used in physics to describe the motion of objects, in chemistry to represent reaction rates, and in biology to model growth and decay of populations. They are also used in engineering, economics, and many other fields to analyze and predict various phenomena.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
377
Replies
1
Views
1K
  • Differential Equations
Replies
16
Views
940
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
18
Views
2K
Replies
2
Views
1K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
9
Views
2K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
2
Views
1K
Back
Top