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
ChiralSuperfields
1,217
132
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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields 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, ChiralSuperfields 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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields 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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #18
Maybe we can use some type of functional calculus( Borel, etc)to formalize it?
 
  • Like
Likes ChiralSuperfields
  • #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 ChiralSuperfields 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 ChiralSuperfields
  • #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 ChiralSuperfields
  • #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 ChiralSuperfields

1. What is a differential equation?

A differential equation is a mathematical equation that describes the relationship between a function and its derivatives. It contains one or more derivatives of an unknown function, and the goal is to find the function that satisfies the equation.

2. What is the meaning of the symbols in the given differential equation?

In the given differential equation, y represents the unknown function, y' represents the first derivative of y, and x^2 represents the independent variable.

3. How do you solve a differential equation?

There are various methods for solving differential equations, such as separation of variables, integrating factors, and substitution. In this particular equation, you can use the method of integrating factors to solve for y.

4. What does the solution to a differential equation represent?

The solution to a differential equation represents the function that satisfies the given equation. In this case, it represents the relationship between x and y that satisfies the equation y + y' - 2y = x^2.

5. How are differential equations used in science?

Differential equations are used in many fields of science, including physics, engineering, economics, and biology. They are used to model and understand real-world phenomena, such as the growth of populations, the flow of fluids, and the behavior of electrical circuits.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
290
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
483
  • Calculus and Beyond Homework Help
Replies
7
Views
694
Replies
7
Views
527
  • Calculus and Beyond Homework Help
Replies
3
Views
909
  • Calculus and Beyond Homework Help
Replies
2
Views
199
  • Calculus and Beyond Homework Help
Replies
2
Views
516
  • Calculus and Beyond Homework Help
Replies
6
Views
858
Replies
12
Views
391
Back
Top