Differential equation problem: y" + y' - 2y = x^2

In summary: Many thanks!In summary, the solution to this problem is to find the coefficients of the given polynomial which makes the function on the left identically equal to the function on the right.
  • #1
member 731016
Homework Statement
Please see below
Relevant Equations
Please see below
For this,
1682662771738.png

The solution is,
1682662795087.png

However, why did they not move the x^2 to the left hand side to create the term ##(-2A - 1)x^2##? Is it possible to solve it this way?

Many thanks!
 
Physics news on Phys.org
  • #2
Yes you can solve it that way.
By subtracting the ## (1)x^2 ## from both sides, we have ## (0)x^2 ## on the RHS. Now equating coefficients we get:

## -2A - 1 = 0 ##
## -2A = 1 ##
## A = -1/2 ##

Just as in the given solution
 
  • Like
Likes member 731016
  • #3
YouAreAwesome said:
Yes you can solve it that way.
By subtracting the ## (1)x^2 ## from both sides, we have ## (0)x^2 ## on the RHS. Now equating coefficients we get:

## -2A - 1 = 0 ##
## -2A = 1 ##
## A = -1/2 ##

Just as in the given solution
Thank you for your reply @YouAreAwesome !

Is there not a way of solving without comparing coefficients?

Many thanks!
 
  • #4
ChiralSuperfields said:
Thank you for your reply @YouAreAwesome !

Is there not a way of solving without comparing coefficients?

Many thanks!
There might be, but I don't know of it. With three unknowns ## A, B ## and ## C ## we usually need three equations to find their values. The only way to extract three equations from the given equation is to equate the three coefficients.
 
  • Like
Likes member 731016
  • #5
ChiralSuperfields said:
Is there not a way of solving without comparing coefficients?

Set [itex]u = y' + 2y[/itex]. Then [tex]
\begin{split}
u' - u &= (y'' + 2y') - (y' + 2y) \\ &= y'' + y' - 2y \\&= x^2. \end{split}[/tex] This gives you two first order linear ODEs to solve.

(This works because [itex]\lambda^2 + \lambda - 2 = (\lambda - 1)(\lambda + 2)[/itex].)
 
  • Like
Likes chwala and member 731016
  • #6
ChiralSuperfields said:
However, why did they not move the ##x^2## to the left hand side to create the term ##(−2A−1)x^2##? Is it possible to solve it this way?
It has already been shown that it can be solved as you describe. As for why they didn't move the ##x^2## term to the left side, it's likely that they are setting the stage for talking about homogeneous vs. nonhomogeneous differential equations.

For the given problem, the homogeneous equation is ##y'' + y' - 2y = 0## for which the general solution is ##y = c_1e^{-2x} + c_2e^x##.

For the nonhomogeneous equation, (the equation above, but with an ##x^2## term on the right side), it turns out that a particular solution is ##y_p = Ax^2 + Bx + C##. What they've described in the solution is finding the coefficients of ##y_p## so that ##y_p'' + y_p' - 2y_p = x^2##.

Note that the term "homogeneous" has two different meanings as regards to differential equations. The meaning I'm using here is in DEs in which the left side consists of all terms involving the unknown function and its derivatives on the left side, with zero on the right side.

The usual terminology for a solution of the nonhomogeneous problem is "particular solution."
 
  • Like
Likes chwala and member 731016
  • #7
ChiralSuperfields said:
Homework Statement: Please see below
Relevant Equations: Please see below

For this,
View attachment 325616
The solution is,
View attachment 325617
However, why did they not move the x^2 to the left hand side to create the term ##(-2A - 1)x^2##? Is it possible to solve it this way?

Many thanks!
The point here is that you are not solving some linear equation for the one value of ##x## which gives you equality. Neither are you solving a quadratic equation or an absolute value equation for the (possibly) two values of ##x## giving equality.

Here you are solving for the values of the coefficients which make the function (polynomial, in this case) on the left identically equal to the function on the right, for all values of ##x##.
 
  • Like
Likes member 731016
  • #8
You should be aware that you have "solved" the equation in the sense of finding some solutions. You have only found all the solutions of the form ##y = Ax^2+Bx+C##. But they are not all of the solutions of that differential equation. There are other solutions of a different form. Any solution of ##y''+y'-2y = 0## can also be added to the solutions you found and that function would also satisfy the equation.
 
  • Like
Likes vanhees71 and member 731016
  • #9
FactChecker said:
...
There are other solutions of a different form.
...
True enough, but the Problem Statement deals only with finding the coefficients of the given polynomial.
 
  • Like
Likes member 731016 and FactChecker
  • #10
Ultimately, for homogeneous, linear(Edit) ODEs, solution set is a vector space. So it's either the 0 vector or infinite in cardinality.
 
Last edited:
  • Like
Likes chwala, member 731016 and FactChecker
  • #11
SammyS said:
True enough, but the Problem Statement deals only with finding the coefficients of the given polynomial.
Good point. I just wanted to dispel the idea that those were the only solutions. I didn't notice that this problem was before chapter 9, where differential equations would be studied.
 
  • Like
Likes member 731016
  • #12
pasmith said:
Set [itex]u = y' + 2y[/itex]. Then [tex]
\begin{split}
u' - u &= (y'' + 2y') - (y' + 2y) \\ &= y'' + y' - 2y \\&= x^2. \end{split}[/tex] This gives you two first order linear ODEs to solve.

(This works because [itex]\lambda^2 + \lambda - 2 = (\lambda - 1)(\lambda + 2)[/itex].)
The algebra behind why this works is absolutely beautiful and I recommend learning it if you haven't seen it. (It's essentially the fundamental theorem of algebra, a nullity inequality that works even in infinite dimensions and knowing the kernel of d/dx - c for a fixed complex constant c).
 
  • Like
Likes member 731016
  • #13
WWGD said:
Ultimately, for homogeneous, linear PDEs, solution set is a vector space.
Did you mean ODEs here? That is the type of equation being discussed in this thread.
 
  • Like
Likes member 731016 and WWGD
  • #14
Here is another way to solve it. A warning it is not for the faint hearted.

The equations is ##y''+y-2y=x^2##. Change the notations, so that derivatives are denoted by ##D## i.e. the first derivative is ##Dy## instead of ##y'## and the second derivative is ##D^2y## instead of ##y''##.

Now the equation is ##D^2y+Dy-2y=x^2##. The goal is to solve for ##y##, so let's do precisely that.

Factorize and get ##(D^2+D-2)y=x^2##, then divide, so you have ##y=\frac{x^2}{D^2+D-2}## or ##y=\frac{1}{D^2+D-2}x^2##.

Now we focus on ##\frac{1}{D^2+D-2}##. Rewrite it as ##-\frac12\frac{1}{1-\frac12(D+D^2)}##. And using the geometric series ##\frac1{1-r}=1+r+r^2\cdots## we have

##\frac{1}{1-\frac12(D+D^2)}=1+\left[ \frac12(D+D^2)\right]+\left[ \frac12(D+D^2)\right]^2+\left[ \frac12(D+D^2)\right]^3+\cdots##.

We can ignore all terms after the first three because we are applying this to ##x^2## and ##D^nx^2=0## for ##n\ge 3##.

So we have ##-\frac12\frac{1}{1-\frac12(D+D^2)}=-\frac12\left(1+\left[ \frac12(D+D^2)\right]+\left[ \frac12(D+D^2)\right]^2\right)=-\frac12-\frac14D-\frac38D^2##.

In the last step I ignored terms of ##D## to power three or higher agian.

Finally we have ##y=-\frac12\frac{1}{1-\frac12(D+D^2)}x^2=(-\frac12-\frac14D-\frac38D^2)x^2=-\frac12x^2-\frac12x-\frac34##.

Where in the last step we remembered that ##D## means derivative. So ##A=-\frac12##, ##B=-\frac12## and ##C=-\frac34##4.
 
  • Like
Likes chwala and member 731016
  • #15
martinbn said:
Here is another way to solve it. A warning it is not for the faint hearted.

The equations is ##y''+y-2y=x^2##. Change the notations, so that derivatives are denoted by ##D## i.e. the first derivative is ##Dy## instead of ##y'## and the second derivative is ##D^2y## instead of ##y''##.

Now the equation is ##D^2y+Dy-2y=x^2##. The goal is to solve for ##y##, so let's do precisely that.

Factorize and get ##(D^2+D-2)y=x^2##, then divide, so you have ##y=\frac{x^2}{D^2+D-2}## or ##y=\frac{1}{D^2+D-2}x^2##.

Now we focus on ##\frac{1}{D^2+D-2}##. Rewrite it as ##-\frac12\frac{1}{1-\frac12(D+D^2)}##. And using the geometric series ##\frac1{1-r}=1+r+r^2\cdots## we have

##\frac{1}{1-\frac12(D+D^2)}=1+\left[ \frac12(D+D^2)\right]+\left[ \frac12(D+D^2)\right]^2+\left[ \frac12(D+D^2)\right]^3+\cdots##.

We can ignore all terms after the first three because we are applying this to ##x^2## and ##D^nx^2=0## for ##n\ge 3##.

So we have ##-\frac12\frac{1}{1-\frac12(D+D^2)}=-\frac12\left(1+\left[ \frac12(D+D^2)\right]+\left[ \frac12(D+D^2)\right]^2\right)=-\frac12-\frac14D-\frac38D^2##.

In the last step I ignored terms of ##D## to power three or higher agian.

Finally we have ##y=-\frac12\frac{1}{1-\frac12(D+D^2)}x^2=(-\frac12-\frac14D-\frac38D^2)x^2=-\frac12x^2-\frac12x-\frac34##.

Where in the last step we remembered that ##D## means derivative. So ##A=-\frac12##, ##B=-\frac12## and ##C=-\frac34##4.
this is not a valid proof, and I helped the guy on the video where you probably saw that
 
  • Like
Likes member 731016
  • #16
TurtleKrampus said:
this is not a valid proof, and I helped the guy on the video where you probably saw that
What proof! I solved an equation, I didn't prove a statement. What video! I learnt this from Heaviside, no videos during his time.

By the way didn't you see the warning?!
 
  • Like
Likes member 731016
  • #17
martinbn said:
What proof! I solved an equation, I didn't prove a statement. What video! I learnt this from Heaviside, no videos during his time.

By the way didn't you see the warning
Nevermind then, anyway while that gives a correct solution, since it's not really valid you should sub back to see that it works (which it probably does, I cba to check).
It's basically abusing an interesting 'coincidence' of the derivative as a linear operator
 
  • Like
Likes member 731016
  • #18
Maybe we can use some type of functional calculus( Borel, etc)to formalize it?
 
  • Like
Likes member 731016
  • #19
WWGD said:
Maybe we can use some type of functional calculus( Borel, etc)to formalize it?
If you only look at polynomials, which seems to be the case for this problem, then the operator has an inverse.
 
  • Like
Likes member 731016 and WWGD
  • #20
martinbn said:
If you only look at polynomials, which seems to be the case for this problem, then the operator has an inverse.
The problem is that as an operator, it doesn't have null kernel. While this has probably been formalized there are also ways of obtaining an answer using linear algebra (may be a bit surprising, but finite nullity is a king), which are easier to prove they work. Not sure which is easier in practice. (I also suspect that the way this works is because of how this problems translates to a linear algebra problem)
 
  • Like
Likes member 731016
  • #21
TurtleKrampus said:
The problem is that as an operator, it doesn't have null kernel. While this has probably been formalized there are also ways of obtaining an answer using linear algebra (may be a bit surprising, but finite nullity is a king), which are easier to prove they work. Not sure which is easier in practice. (I also suspect that the way this works is because of how this problems translates to a linear algebra problem)
When would nullity be infinite-dimensional in a finite order ODE?
Edit: or maybe you mean## C^2(\mathbb R)##?
 
Last edited:
  • Like
Likes member 731016
  • #22
WWGD said:
When would nullity be infinite-dimensional in a finite order ODE?
Edit: or maybe you mean## C^2(\mathbb R)##?
Proving that the solution space is a finite dimension affine space (that's embedded in a finite dimension vector space), so that you can translate the problem to a problem in linear algebra, you'd need to know beforehand that the differential operator is of finite nullity, which will intuitive is not (?) entirely obvious. [Maybe you'd know how to translate this into a linear matrix differential equation Y' = AY + C, in which case it will be somewhat obvious]
This at first hand does not seem like linear algebra would be enough to solve it, after all most of the results of linear algebra hinge on the fact that we work on finite dimensional vector spaces. HOWEVER, the following nullity theorem:
$$\dim(\ker(AB)) \leq \dim(\ker(A)) + \dim(\ker(B))$$
Works even for infinite dimensions, though it's mostly useless if the linear operators don't have finite nullity (dim ker).
Plus the fact that you can manipulate it to prove a solution ##y## must be ##C^\infty## and thus the derivative is an endomorphism (linear transform onto the same vector space). This allows you to use the fundamental theorem of algebra, since as a ring the operator algebra generated by the derivative is going to be isomorphic to the ring of polynomials with complex coefficients, and split a differential operator into a product of linear differential operators and prove that it is in fact also finite nullity. (And in particular you can find the exact kernel by splitting the differential operator into distinct powers of linear terms. And whose kernels are always distinct so the kernel of the composition is just the direct sum of all the kernels of the distinct powers).
In particular if the equation is of the form ##p(D)y = z## and there exists a differential operator ##q(D)## with ##q(D)z =0## you have that ##y \in \ker(q(D)p(D))## which is finite dimensional. And much easier, to calculate a particular solution ##y_0## will be in a space that's isomorphic to ##\ker(q(D)p(D))/\ker(p(D))## (this avoids what physicists may call resonance) and the problem naturally translates into a matrix equation of the form ##Ax = b##.

In practice one doesn't do all of this, you just decompose the polynomial, find a good basis for the embedding space (usually the best ones are given by monomials of the form ##e^{ax} \cdot {x^k \over k!}##), remove the basis elements that are in the basis of the kernel ##\ker(p(D))##, write a matrix form for the derivative operator restricted to this space (technically the operator which makes a certain diagram commute, but this is a physics forum) and finish writing the matrix equation ##Ax = b##. This is probably much easier done than said, this is also much easier for computing several solutions for similar problems ##p(D)y = w## where ##w## also satsifies ##q(D)w = 0## is immediately translated into some ##Ax = c## after writing ##w## as a sum of the basis elements.
 
Last edited:
  • Like
Likes member 731016

Related to Differential equation problem: y" + y' - 2y = x^2

What is the general solution to the differential equation y" + y' - 2y = x^2?

To find the general solution, we first solve the homogeneous equation y" + y' - 2y = 0. This involves finding the characteristic equation, which is r^2 + r - 2 = 0. Solving this, we get r = 1 and r = -2. Therefore, the general solution to the homogeneous equation is y_h = C1e^x + C2e^(-2x). Next, we find a particular solution to the non-homogeneous equation. We use the method of undetermined coefficients and assume a particular solution of the form y_p = Ax^2 + Bx + C. Substituting y_p into the original equation and solving for A, B, and C, we find the particular solution. Combining y_h and y_p, the general solution is y = C1e^x + C2e^(-2x) + (1/2)x^2 - (1/2)x + 1/2.

How do you determine the characteristic equation for the differential equation?

The characteristic equation is determined by replacing y, y', and y" in the homogeneous form of the differential equation with r, r^2, and r respectively. For the equation y" + y' - 2y = 0, we replace y" with r^2, y' with r, and y with 1. This gives us the characteristic equation r^2 + r - 2 = 0.

What method can be used to find the particular solution to the non-homogeneous differential equation?

The method of undetermined coefficients is commonly used to find the particular solution to the non-homogeneous differential equation. This involves assuming a solution form based on the type of the non-homogeneous term (in this case, x^2) and then determining the coefficients by substituting the assumed solution into the original differential equation and solving for the coefficients.

Can the superposition principle be applied to this differential equation?

Yes, the superposition principle can be applied to this differential equation. According to this principle, the general solution of a linear non-homogeneous differential equation is the sum of the general solution of the corresponding homogeneous equation and a particular solution of the non-homogeneous equation. Thus, for y" + y' - 2y = x^2, the general solution is the sum of the homogeneous solution y_h = C1e^x + C2e^(-2x) and a particular solution y_p.

What are the initial conditions required to find a specific solution to this differential equation?

To find a specific

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
569
  • Calculus and Beyond Homework Help
Replies
18
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
653
  • Calculus and Beyond Homework Help
Replies
7
Views
844
  • Calculus and Beyond Homework Help
Replies
7
Views
712
  • Calculus and Beyond Homework Help
Replies
27
Views
568
  • Calculus and Beyond Homework Help
Replies
3
Views
412
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
390
  • Calculus and Beyond Homework Help
Replies
5
Views
387
Back
Top