3
$\begingroup$

I'm trying to solve a simple system of differential equations.

dp = (D[#1, #2] + #2 #1) &;
dn = (D[#1, #2] - #2 #1) &;
DSolve[{dp[f1[x], x] == a f2[x], dn[f2[x], x] == b f1[x]}, {f1, f2},
x]

using DSolve. Unfortunately, Mathematica is not able to handle this task. Is there a way to force Mathematica to print a result? Of course, it's a simple problem one could do by hand but that's not the point:-).

$\endgroup$
1
  • $\begingroup$ I've contacted Wolfram, the support team forwarded the issue to the developers. I'll let you know if I find anything new. $\endgroup$ Sep 17, 2013 at 16:23

2 Answers 2

1
$\begingroup$

you can manually simplify the system, eliminating f1..

DSolve[dp[dn[f2[x], x]/b, x] == a f2[x], f2, x] 

(*  {{f2 -> Function[{x}, 
      C[2] ParabolicCylinderD[(a b)/2, I Sqrt[2] x] + 
      C[1] ParabolicCylinderD[1/2 (-2 - a b), Sqrt[2] x]]}} *)

You get that by hand??

$\endgroup$
4
  • $\begingroup$ Yup:-). The result is a confluent hypergeometric function. But it'd be great if Mathematica could do it by itself:-). $\endgroup$ Sep 13, 2013 at 19:28
  • 1
    $\begingroup$ a cheat I know but DSolve[Eliminate[Join[eqns,{D[eqns,x][[2]]}],{f1[x],f1'[x]}],f2,x] where eqns={dp[f1[x],x]==a f2[x],dn[f2[x],x]==b f1[x]}. $\endgroup$
    – chuy
    Sep 13, 2013 at 19:44
  • $\begingroup$ That's a very nice cheat:-). It's practically the same as the solution provided by george2079 though. $\endgroup$ Sep 14, 2013 at 11:50
  • $\begingroup$ @GregoryRut I think you are the first person I've met who has associated the terms "simple problem" and "confluent hypergeometric function" $\endgroup$ Sep 14, 2013 at 15:08
1
$\begingroup$

I'm not sure if this answers your question but a little manipulation gives the solution in terms of Hermite polynomials.

sys = {x f[x] + f'[x] == a g[x], -x g[x] + g'[x] == b f[x]};

Differentiatingthis system and eliminating first derivatives increases the order of an ODE system

sys2 = D[sys, x] /. First@Solve[sys, {f'[x], g'[x]}] // Simplify
(* => {(-1 + a b + x^2) f[x] == f''[x], (1 + a b + x^2) g[x] == g''[x]} *)

but DSolve can handle it

$$ f(x) = e^{-\frac{x^2}{2}} 2^{-\frac{a b}{4}} \left(c_1 2^{\frac{a b}{2}} H_{-\frac{a b}{2}}(x)+\sqrt{2} c_2 e^{x^2} H_{\frac{1}{2} (a b-2)}(i x)\right) $$

$$ g(x) = e^{-\frac{x^2}{2}} 2^{-\frac{a b}{4}} \left(c_3 2^{\frac{a b}{2}+\frac{1}{2}} H_{\frac{1}{2} (-a b-2)}(x)+c_4 e^{x^2} H_{\frac{a b}{2}}(i x)\right) $$

$\endgroup$
5
  • $\begingroup$ This is very similar to the solution provided by @chuy (of course, both are very nice but they do not answer my question). We're putting f'[x] and g'[x] by hand. It's like one's doing all the work for Mathematica:-). Perhaps I will need to restate my question. $\endgroup$ Sep 15, 2013 at 15:54
  • $\begingroup$ Yes, but this is done by Mathematica. What do you expect than? $\endgroup$
    – mmal
    Sep 16, 2013 at 14:15
  • $\begingroup$ I'd expect that DSolve will be able to crack this problem by itself. A system of 2 equations is just a toy model. If you consider more equations, things will not go so smoothly anymore. Anyway, I've sent a message to Wolfram, perhaps they will be able to help us. $\endgroup$ Sep 16, 2013 at 14:22
  • $\begingroup$ Have you tried this differentiation/substitution trick on your objective problem? $\endgroup$
    – mmal
    Sep 16, 2013 at 14:27
  • $\begingroup$ Yup, I stopped the evaluation after a few minutes. $\endgroup$ Sep 16, 2013 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.