Message Boards Message Boards

GROUPS:

Inhomogeneous ODE, DSolve variation of parameters

Posted 10 years ago
3229 Views
|
1 Reply
|
3 Total Likes
|
Hello,

I am a little confused by Mathematica's implementation of the variation of parameters method in DSolve. Consider solving a general inhomogenous function: 
DSolve[f''[x] + f[x] == g[x], f[x],x]

The provided solution is: 
f[x] = Exp[x]*C[1] + Exp[-x]*C[2] + Exp[-x]*(Exp[2*x]* Integrate[1/2*Exp[-k]*g[k], {k, 1, x}] + Integrate[-1/2* Exp[k]*g[k], {k, 1, x}])

My question is this: why are the limits of integration for the particular solution 1 to x?

In the general expression for variation of parameters, the integral is indefinite. By applying the second fundamental theorem of calculus, the indefinite integral can be converted to a definite integral from x0 to x provided the integrand is continuous and at the lower limit of integration (x0), the integrand evaluates to zero.  However, Mathematica does not seem to enforce either of these requirements, so I doubt this is the reason the limits are as given. Is there a Green's function arguement that would justify these limits for the general function g? 

Thank you,
Anna 
POSTED BY: Anna Craig
Here is the solution given by Mathematica 9:
SOL[x] = f[x] /. DSolve[f''[x] + f[x] == g[x], f[x], x] // First // FullSimplify



Wouldn't the following line confirm that the solution was defined correctly because it satisfies the original equation?
D[SOL[x], {x, 2}] + SOL[x] // FullSimplify
(* otput *)
g[x]
In a bit simpler way - the same fact:
eq = f''[x] + f[x] == g[x];
eq /. DSolve[eq, f, x] // FullSimplify
(* output *)
{True}
You may also want to take a look at a step-by-step solution from Wolfram|Alpha (if you follow the link, click step-by-step button):
WolframAlpha["f''[x] + f[x] == g[x]", PodStates -> {"DifferentialEquationSolution__Step-by-step solution"}]
POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract