How to solve a differential equation using substitution?

In summary: You cannot treat $x$ as a constant in that integral. In summary, the proper solution is $y+x\ln|x|=Cx$.
  • #1
find_the_fun
148
0
Solve the DE using an appropriate substitution.

\(\displaystyle (x-y)dx+xdy=0\)

First step is to determine the substitution. I was told for homogeneous ODEs to always make the substitution y=ux but the substitution u=x-y looks better.

Let u = x-y then u'=-y' which means y'=-u'
rewrite the original equation x-y+xy'-o
now plugging in u and u' gives u+x(-u')=0 which gives x du = -u dx and integrating gives xu=-ux which doesn't make any sense.
 
Physics news on Phys.org
  • #2
I would first rewrite the ODE as:

\(\displaystyle \d{y}{x}=\frac{y}{x}-1\)

Using the substitution \(\displaystyle v=\frac{y}{x}\), we then get:

\(\displaystyle \d{v}{x}=-\frac{1}{x}\)

Can you proceed?
 
  • #3
MarkFL said:
I would first rewrite the ODE as:

\(\displaystyle \d{y}{x}=\frac{y}{x}-1\)

Using the substitution \(\displaystyle v=\frac{y}{x}\), we then get:

\(\displaystyle \d{v}{x}=-\frac{1}{x}\)

Can you proceed?

I don't really know what the overall procedure is when it comes to substitution. Wikibooks states the procedure is
  1. Take a term of the equation and replace it with a variable v. The key is that the new variable must cover all instances of the variable y. Otherwise substitution would not help.
  2. Solve for
    efaf9f3a22dad4658696b0ea9c0c7139.png
    in terms of
    9e3669d19b675bd57058fd4664205d2a.png
    and
    5d5f6df9523292d6aa38007fa3bae316.png
    . To do this, take the equation
    c385ad71be53fe3c6e48d7e2a31d04b7.png
    where
    8fa14cdd754f91cc6554c9e71929cce7.png
    is the term you replaced and take its derivative.
  3. Plug in
    5d5f6df9523292d6aa38007fa3bae316.png
    and solve for
    9e3669d19b675bd57058fd4664205d2a.png
    .
  4. Plug
    9e3669d19b675bd57058fd4664205d2a.png
    into the original term replaced, and solve for
    415290769594460e2e485922904f345d.png
    .

I'm unclear on the first step. How do you know what the substitution should be? What made you say let \(\displaystyle v=\frac{y}{x}\)? EDIT: in step 1 they say "take a term", what's a term?
 
  • #4
find_the_fun said:
I don't really know what the overall procedure is when it comes to substitution. Wikibooks states the procedure is
  1. Take a term of the equation and replace it with a variable v. The key is that the new variable must cover all instances of the variable y. Otherwise substitution would not help.
  2. Solve for in terms of and . To do this, take the equation where is the term you replaced and take its derivative.
  3. Plug in and solve for .
  4. Plug into the original term replaced, and solve for .

I'm unclear on the first step. How do you know what the substitution should be? What made you say let \(\displaystyle v=\frac{y}{x}\)? EDIT: in step 1 they say "take a term", what's a term?

A term is simply a part of the function.

It comes from experience knowing to substitute v = y/x. In general, if it CAN be written like a function of y/x, when the substitution should be valid and give you a separable DE in terms of v and x.
 
  • #5
Ok I think I'm starting to understand. One attempt I made led me to the wrong answer, where did I go wrong?

\(\displaystyle (x-y)dx + xdy=0\)
let \(\displaystyle y =ux\) then \(\displaystyle dy=x du + u dx\)
Plugging in \(\displaystyle (x-ux)dx+x^2du+xu dx = 0 \)
simplifies to \(\displaystyle x^2du+xdx=0\)
so one solution is \(\displaystyle x=0\) (or should it be y?)

Now we can factor out an x so \(\displaystyle x(x du + dx)=0 \implies xdu+dx=0
\)

Now can we just integrate so \(\displaystyle \int x du + \int dx = xu+x+C=0\) putting back in \(\displaystyle u=\frac{y}{x}\) gives \(\displaystyle x \frac{y}{x} +x+C \implies y=-x+C\) but the answer key has \(\displaystyle y+xln|x|=xC\)
 
  • #6
Your substitution is correct, but at the end you do some invalid steps.
We need to solve $xdu+dx=0$. Separable of the variables yields
$$-xdu = dx \Leftrightarrow -du = \frac{dx}{x} \Leftrightarrow -u = \ln|x|+C$$
Back-substitution gives
$$\frac{-y}{x}=\ln|x|+C$$
and hence the solution is $-y = x \ln|x|+Cx \Rightarrow y + x \ln|x|=Cx$.
 
  • #7
Siron said:
Your substitution is correct, but at the end you do some invalid steps.
We need to solve $xdu+dx=0$. Separable of the variables yields
$$-xdu = dx \Leftrightarrow -du = \frac{dx}{x} \Leftrightarrow -u = \ln|x|+C$$
Back-substitution gives
$$\frac{-y}{x}=\ln|x|+C$$
and hence the solution is $-y = x \ln|x|+Cx \Rightarrow y + x \ln|x|=Cx$.

Can you point out which steps are invalid so I don't repay them again.
 
  • #8
Hint:
Take a closer look at \(\displaystyle \int xu~du\). Is x a constant with respect to u?

-Dan
 
  • #9
topsquark said:
Hint:
Take a closer look at \(\displaystyle \int xu~du\). Is x a constant with respect to u?

-Dan

No, x is a variable used by u. So what does that matter? And where did I use \(\displaystyle \int xu~du\)?
 
  • #10
As Topsquark already said, Take a closer look at your post:
find_the_fun said:
Now can we just integrate so \(\displaystyle \int x du + \int dx = xu+x+C=0\)

You claim: $\int x du = x u$, which means that you've treated $x$ as a constant. But the integral is with respect to $u$ and $u$ is a function of $x$.
 
Last edited:

FAQ: How to solve a differential equation using substitution?

How do you solve an ODE with substitution?

To solve an ODE with substitution, you need to first identify the form of the ODE. Then, substitute the given variables with a new variable that will make the equation easier to solve. Once the substitution is done, solve the resulting equation using integration techniques.

What is the purpose of substitution in solving an ODE?

The purpose of substitution in solving an ODE is to simplify the equation and make it easier to solve. It allows us to transform the given equation into a more manageable form, making it easier to find a solution.

What are the common substitution techniques used in solving ODEs?

The two most commonly used substitution techniques in solving ODEs are the Homogeneous Substitution and the Bernoulli Substitution. Homogeneous Substitution is used for equations that are homogeneous in nature, while the Bernoulli Substitution is used for equations that are not in standard form and involve a fractional power.

Can substitution be used for all types of ODEs?

No, substitution cannot be used for all types of ODEs. It is primarily used for first-order ODEs, specifically those that are separable, linear, or exact. Other types of ODEs may require different techniques to solve.

Are there any limitations to using substitution in solving ODEs?

Yes, there are certain limitations to using substitution in solving ODEs. It may not work for all types of ODEs and may not always result in an explicit solution. In some cases, the substitution may also introduce extraneous solutions, so it is important to check the solutions obtained after substitution.

Back
Top