# Solving DE by undetermined Coefficients

• helpppmeee
In summary: This is why you got the extra ##x## on the end of your guess. So, you should have guessed ##y_p = (Ax^2+Bx+C)\sin x + (Dx^2+Ex+F)\cos x##. Once you see why this works, you'll have the general idea for solving for the particular solution in general.In summary, to solve for the particular solution in an Initial Value Problem, one must first find a general solution for the homogeneous equation, then use that to determine the form of the particular solution. If the particular solution is not linearly independent from the homogeneous solution, it must be multiplied by the lowest power of x to make it independent.
helpppmeee

## Homework Statement

y'' + y = xsinx where y(0) = 0 and y'(0) = 1

## Homework Equations

yc = C1sinx + C2cosx

## The Attempt at a Solution

So my attempt includes the yc which undoubtedly is correct. I now try to solve yp

yp = Axsinx + Bxcosx
y''p = A(2cosx - xsinx) + B(-2sinx - xcosx)

Substituting: y''p + yp = xsinx, clearly doesn't equal xsinx. There are no comparable values to xsinx to even try and solve for A or B.

Attempting using a different algorithm: yp = (A + Ax)sinx + (B + Bx)cosx
Notice overlap from yp to yc, therefore multiply by x: yp = (Ax +Ax^2)sinx + (Bx + Bx^2)cosx
y''p = A(2cosx + 2sinx -xsinx +4xcosx -x^2sinx) + B(-2sinx + 2cosx - 4xsinx - x^2cosx)

and y''p + yp = A(2cosx + 2sinx + 4xcosx + xsinx) + B(-2sinx + 2cosx - 4xsinx + xcosx)

Arrgggh this is really troubling me. I honestly have no idea what I'm doing wrong or how to proceed with the Initial Value Problem afterwards.

helpppmeee said:

## Homework Statement

y'' + y = xsinx where y(0) = 0 and y'(0) = 1

## Homework Equations

yc = C1sinx + C2cosx

## The Attempt at a Solution

So my attempt includes the yc which undoubtedly is correct. I now try to solve yp

yp = Axsinx + Bxcosx
y''p = A(2cosx - xsinx) + B(-2sinx - xcosx)

Substituting: y''p + yp = xsinx, clearly doesn't equal xsinx. There are no comparable values to xsinx to even try and solve for A or B.

Attempting using a different algorithm: yp = (A + Ax)sinx + (B + Bx)cosx
Notice overlap from yp to yc, therefore multiply by x: yp = (Ax +Ax^2)sinx + (Bx + Bx^2)cosx
y''p = A(2cosx + 2sinx -xsinx +4xcosx -x^2sinx) + B(-2sinx + 2cosx - 4xsinx - x^2cosx)

and y''p + yp = A(2cosx + 2sinx + 4xcosx + xsinx) + B(-2sinx + 2cosx - 4xsinx + xcosx)

Arrgggh this is really troubling me. I honestly have no idea what I'm doing wrong or how to proceed with the Initial Value Problem afterwards.
Try some general linear function times sin(x) & cos(x).

##\displaystyle y_p=(Ax+B)\sin(x)+(Cx+D)\cos(x) ##

OH my, rookie mistake LOL. but still, i only get that y''p + yp = 2Acosx - 2Csinx. My logic is telling me to try out yp = (Ax^2 + Bx + C)sinx + (Dx^2 + Ex + F)cosx, based upon my classroom notes. I try this and get
y''p + yp = 2Asinx + 2Dcosx + 2(2Ax+B)cosx -2(2Dx + E)sinx = xsinx

now i understand that 2(2Ax+B)cosx -2(2Dx + E)sinx = xsinx and so 2(2Ax+B)cosx = 0 and -2(2Dx + E)sinx = xsinx
as well as: 2Asinx + 2Dcosx = 0, but this seems like an unsolvable puzzle to me. I also believe i may be overthinking things A LOT so um yeah. What's going on here?

Last edited:
Sorry but i edited my post and am not sure if you can see that from outside the thread so... bump

Your initial guess at the particular solution would normally be ##y_p = (Ax+B)\sin x + (Cx+D)\cos x##; however, because this isn't linearly independent from the homogeneous solution, you need to multiply it by the lowest power of ##x## to make it independent.

## 1. What is the undetermined coefficient method?

The undetermined coefficient method is a technique used to solve differential equations with constant coefficients. It involves finding a particular solution by assuming a form for the solution and then solving for the coefficients.

## 2. When is the undetermined coefficient method used?

The undetermined coefficient method is typically used when the differential equation has no initial conditions or when the right-hand side of the equation is a linear combination of functions that are already known solutions to the homogeneous equation.

## 3. How do you determine the form of the particular solution in the undetermined coefficient method?

The form of the particular solution is determined by the form of the right-hand side of the equation. For example, if the right-hand side is a polynomial, the particular solution will also be a polynomial of the same degree.

## 4. Are there any limitations to the undetermined coefficient method?

Yes, the undetermined coefficient method can only be used for linear differential equations with constant coefficients. It also does not work for equations with repeated roots or when the right-hand side of the equation contains trigonometric or exponential functions.

## 5. Can the undetermined coefficient method be combined with other methods?

Yes, the undetermined coefficient method can be combined with other methods, such as the method of variation of parameters, to solve more complex differential equations. It is often used in conjunction with the method of undetermined coefficients to find the particular solution and the method of variation of parameters to find the complementary solution.

Replies
1
Views
2K
Replies
9
Views
2K
Replies
3
Views
1K
Replies
7
Views
880
Replies
1
Views
919
Replies
2
Views
2K
Replies
3
Views
2K
Replies
9
Views
1K
Replies
2
Views
1K
Replies
2
Views
5K