3
$\begingroup$

The issue I am facing is the following. I am trying to solve a system of two coupled first order ODE's with DSolve:

eqns = {A*f'[x] == -x*f[x]/2 + B*g[x], A*g'[x] == x*g[x]/2 + B*f[x]};
DSolve[eqns, {f[x], g[x]}, x]

As output this just gives the same command, which from what I gather means that DSolve cannot solve it.

But if I just explicitly substitute the equations into one another, then suddenly it can be solved:

fun = f[x] /. Solve[A*g'[x] == x*g[x]/2 + B*f[x], f[x]];
dfun = D[fun, x];
DSolve[A*f'[x] == -x*f[x]/2 + B*g[x] /. {f[x] -> fun, f'[x] -> dfun}, 
 g[x], x]

This gives

{{g[x] -> 
   C[2] ParabolicCylinderD[B^2/A, (I x)/Sqrt[A]] + 
    C[1] ParabolicCylinderD[(-A - B^2)/A, x/Sqrt[A]]}}

This makes me think that I'm simply doing something wrong in the first line, which is probably some silly notation mistake. If someone would be able to help me out, I'd be very thankful.

$\endgroup$
  • 4
    $\begingroup$ Nothing wrong with what you did; only that DSolve[] is not sufficiently smart to recognize that the problem can be manipulated to something solvable. $\endgroup$ – J. M. will be back soon Mar 22 at 13:12
  • $\begingroup$ Hm, I see. Well, that's okay I suppose! Thank you. What does one do with the question in this case? I'll look around in the meta part of the site a bit to figure that out, but perhaps it comes up more often. $\endgroup$ – user129412 Mar 22 at 13:14
  • 4
    $\begingroup$ You could try reporting this example to Wolfram support; then maybe a future version of DSolve[] will be smarter than the current version. ;) $\endgroup$ – J. M. will be back soon Mar 22 at 13:16
  • 1
    $\begingroup$ I tried with Mathematica 12.0 and can't solve :( $\endgroup$ – Mariusz Iwaniuk Apr 12 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.