Is My Trial Function Correct for Solving this ODE? (Exam Tomorrow)

In summary, the solution to the given equation is y = A\mathrm{e}^x + B\mathrm{e}^{2x} + 1/2(1-2\mathrm{e}^x -2\mathrm{e}^xx).
  • #1
jdstokes
523
1
[itex]y''-3y'+2y=\mathrm{e}^x +1[/itex]

Find [itex]y[/itex].

Going through the normal procedure we get the complementary function

[itex]y = A\mathrm{e}^x + B\mathrm{e}^{2x}[/itex].

Using the trial function

[itex]y = Cx\mathrm{e}^x + D[/itex]
(because of overlap with the complementary function)

leads to
[itex]-C\mathrm{e}^x + 2D = \mathrm{e}^x+1[/itex]

Does this mean

[itex]C=-1,D=1/2[/itex]??

If so, the general soln is [itex]y = A\mathrm{e}^x + B\mathrm{e}^{2x} -x\mathrm{e}^x + 1/2[/itex].

According to Mathematica, however, the solution should be of the form

[itex]y = A\mathrm{e}^x + B\mathrm{e}^{2x} + 1/2(1-2\mathrm{e}^x -2\mathrm{e}^xx)[/itex].

Am I using the wrong trial function or what?

Thanks in advance.

James
 
Physics news on Phys.org
  • #2
Nevermind, I figured out that Mathematica is using a different set of constants.
 

1. What is a trial function for an ODE?

A trial function for an ODE is a mathematical function that is used to approximate the solution to a differential equation. It is often chosen based on the known boundary conditions and initial values of the ODE.

2. How do you determine the best trial function for an ODE?

The best trial function for an ODE is determined by trial and error. Different trial functions can be tested and the one that yields the most accurate results is considered the best.

3. What is the purpose of using a trial function for an ODE?

The purpose of using a trial function for an ODE is to simplify the process of solving the differential equation. By using a trial function, the ODE can be converted into a simpler algebraic equation, making it easier to find a solution.

4. Can a trial function be used for any type of ODE?

Yes, a trial function can be used for any type of ODE. However, the choice of trial function may differ depending on the type of ODE and its boundary conditions.

5. Is there a specific method for choosing a trial function for an ODE?

There is no specific method for choosing a trial function for an ODE. It often involves using knowledge of the ODE and its boundary conditions, as well as trial and error to find the most suitable function.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
825
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
Replies
4
Views
501
Replies
3
Views
331
  • Calculus and Beyond Homework Help
Replies
1
Views
705
  • Calculus and Beyond Homework Help
Replies
3
Views
332
  • Calculus and Beyond Homework Help
Replies
2
Views
544
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
Back
Top