Linear ode; how does answer key get this?

  • Context: MHB 
  • Thread starter Thread starter find_the_fun
  • Start date Start date
  • Tags Tags
    Linear Ode
Click For Summary
SUMMARY

The discussion focuses on solving the linear ordinary differential equation (ODE) given by x(dy/dx) - y = x^2sin(x). The correct solution is identified as y = cx - xcos(x), with the integrating factor P(x) = -1/x leading to the exponential integral e^{∫-1/x dx} = 1/x. Participants clarify misconceptions regarding the integration process and the domain of the solution, concluding that the solution is valid for all real numbers, including x = 0.

PREREQUISITES
  • Understanding of linear ordinary differential equations (ODEs)
  • Familiarity with integrating factors and exponential integrals
  • Knowledge of integration techniques, particularly with logarithmic functions
  • Basic concepts of solution domains in differential equations
NEXT STEPS
  • Study the method of integrating factors in linear ODEs
  • Learn about the implications of solution domains in differential equations
  • Explore advanced integration techniques involving logarithmic and exponential functions
  • Investigate the behavior of solutions to ODEs at boundary conditions
USEFUL FOR

Mathematics students, educators, and anyone involved in solving or teaching linear ordinary differential equations and integration techniques.

find_the_fun
Messages
147
Reaction score
0
Solve the linear equation:

[math]x\frac{dy}{dx}-y=x^2sinx[/math]
rewrite [math]\frac{dy}{dx}-\frac{y}{x}=\frac{x^2sinx}{x}=xsinx[/math]
[math]P(x)=\frac{-1}{x}[/math]
So [math]e^ { \int \frac{-1}{x} dx }=-1[/math]<=this is where I went wrong
[math]\frac{d}{dx}[-y]=-xsinx[/math]
[math]\int -x sin(x)=xcosx-sinx +C[/math] but the answer key gives [math]y=cx-xcosx[/math]
 
Last edited:
Physics news on Phys.org
find_the_fun said:
[math]P(x)=\frac{-1}{x}[/math]
So [math]e^ { \int \frac{-1}{x} dx }=-1[/math]
Check your integral again. [math]e^{\int -\frac{1}{x}~dx} = -x[/math]

-Dan
 
topsquark said:
Check your integral again. [math]e^{\int -\frac{1}{x}~dx} = -x[/math]

-Dan

Erm...
$$e^{\int -\frac{1}{x}~dx} = e^{-\ln x+c_1}=e^{\ln(1/x)+c_1}=\frac{c_2}{x}$$
 
I like Serena said:
Erm...
$$e^{\int -\frac{1}{x}~dx} = e^{-\ln x+c_1}=e^{\ln(1/x)+c_1}=\frac{c_2}{x}$$

Ok I'm still stuck but I may know why. Isn't $e^{-lnx}=-x$?
 
find_the_fun said:
Ok I'm still stuck but I may know why. Isn't $e^{-lnx}=-x$?

Because when we apply the rule $y\ln x=\ln x^y$, we get:
$$e^{-\ln x}=e^{-1 \cdot \ln x}
=e^{\ln x^{-1}}=e^{\ln (1/x)}=\frac{1}{x}$$
 
find_the_fun said:
Ok I'm still stuck but I may know why. Isn't $e^{-lnx}=-x$?
Sort of. As I like Serena pointed out I was ignoring the arbitrary constant in the integration.
[math]\int -\frac{1}{x}~dx = -ln|x| + C[/math]

-Dan
 
I finally get it now :) One more question, why is the interval [math](0, \infty)[/math]? Is it because it because x can't be 0 because there's the intermediate step [math]\frac{d}{dx}[\frac{y}{x}][/math]?
 
find_the_fun said:
I finally get it now :) One more question, why is the interval [math](0, \infty)[/math]? Is it because it because x can't be 0 because there's the intermediate step [math]\frac{d}{dx}[\frac{y}{x}][/math]?

Intermediate steps do not really count.
They can introduce new solutions, or "lose" solutions, such as in this case.
Ultimately, we have to check the solutions against the original equation and consider what should happen to all the solutions we inadvertently either introduced, or eliminated.

The domain of the solution is actually all of $\mathbb R$ and the constant $c$ can also take all real values.
We can tell by substituting the solution we found in the original equation.

The solution is:
$$y=cx-x\cos x \Rightarrow \d y x = c - \cos x + x\sin x$$
Substituting gives:
$$x\d yx - y = x(c - \cos x + x\sin x) - (cx-x\cos x) = x^2\sin x$$
So the solution satisfies the ODE for all values of $x$.
That is including $x=0$ for which the equation is well defined.
 

Similar threads

  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K