0
$\begingroup$

I'm working on a Riccatti equation that I know has the following property:

b^2 - a c > 0 

I've been trying to use this as an assumption in DSolve, but no matter what I get more general solutions and I'm not able to simplify them to the one that works.

DSolve[{a (FC[h])^2 - 2 b FC[h] + c - D[FC[h], h] == 0, FC[0] == 0}, FC[h], h, Assumptions -> b^2 - a c > 0 ]

There is a solution I know works:

q := Sqrt[b^2 - a c] 
FCT[h_] := (c (1 - E^(-2 q (h))))/(q + b + (q - b) E^(-2 q (h)));

I think I'm not able to obtain this solution in DSolve because I'm failing to give the assumption correctly. This previous solution FCT[h] only works for b^2-ac>0 which is exactly what I need. Any guidance in this problem would he highly appreciated :)

Thank you,

$\endgroup$
0

2 Answers 2

2
$\begingroup$

Although Jim Baldwin's solution is entirely satisfactory (+1), it is possible to obtain the desired expression without the additional assumptions. Begin by solving the ODE without the boundary condition.

s = FC[h] /. Flatten@DSolve[{a (FC[h])^2 - 2 b FC[h] + c - D[FC[h], h] == 0}, 
    FC[h], h, Assumptions -> b^2 - a c > 0]
(* (b - Sqrt[b^2 - a c] Tanh[Sqrt[b^2 - a c] h + Sqrt[b^2 - a c] C[1]])/a *)

Now, obtainingC[1] by Solve[0 == s /. h -> 0, C[1]] gives the same ugly expressions that DSolve with the boundary condition gives.

Flatten@Solve[0 == s /. h -> 0, C[1]]
(* {C[1] -> -(ArcCosh[-(Sqrt[-b^2 + a c]/(Sqrt[a] Sqrt[c]))]/Sqrt[b^2 - a c]), 
    C[1] -> ArcCosh[-(Sqrt[-b^2 + a c]/(Sqrt[a] Sqrt[c]))]/Sqrt[b^2 - a c], 
    C[1] -> -(ArcCosh[Sqrt[-b^2 + a c]/(Sqrt[a] Sqrt[c])]/Sqrt[b^2 - a c]), 
    C[1] -> ArcCosh[Sqrt[-b^2 + a c]/(Sqrt[a] Sqrt[c])]/Sqrt[b^2 - a c]} *)

Instead, simply observe that C[1] is

C[1] -> ArcTanh[b/Sqrt[b^2 - a c]]/Sqrt[b^2 - a c]

Then,

s /. C[1] -> ArcTanh[b/Sqrt[b^2 - a c]]/Sqrt[b^2 - a c]
(* (b - Sqrt[b^2 - a c] Tanh[Sqrt[b^2 - a c] h + ArcTanh[b/Sqrt[b^2 - a c]]])/a *)

Simplify[TrigToExp[%]] /. Sqrt[b^2 - a c] -> q
(* (c (-1 + E^(2 h q)))/(b (-1 + E^(2 h q)) + (1 + E^(2 h q)) q) *)

and

Simplify[% == (c (1 - E^(-2 q (h))))/(q + b + (q - b) E^(-2 q (h)))]
(* True *)

It may be that the additional assumptions are needed when working with the DSolve solution with boundary condition, because it introduces factors of Sqrt[a] and Sqrt[c] that eventually drop out of the simplification but appear to require that a > 0 and c > 0 during intermediate steps.

$\endgroup$
1
$\begingroup$

Here's a partial answer... If one assumes a few more conditions, then the usual simplification works fine:

sol = FC[h] /. Simplify[TrigToExp[DSolve[{a (FC[h])^2 - 2 b FC[h] + c - D[FC[h], h] == 0, FC[0] == 0}, FC[h], h]],
  Assumptions -> {a > 0, b > 0, c > 0, b^2 - a c > 0}]

$\left\{-\frac{-a b c \left(e^{2 h \sqrt{b^2-a c}}+3\right)+a c \sqrt{b^2-a c} \left(e^{2 h \sqrt{b^2-a c}}-1\right)+4 b^2 \sqrt{b^2-a c}+4 b^3}{a \left(a c \left(e^{2 h \sqrt{b^2-a c}}+1\right)-2 b \sqrt{b^2-a c}-2 b^2\right)},-\frac{c \left(\sqrt{b^2-a c}+b\right) \left(e^{2 h \sqrt{b^2-a c}}-1\right)}{a c \left(e^{2 h \sqrt{b^2-a c}}+1\right)-2 b \left(\sqrt{b^2-a c}+b\right) e^{2 h \sqrt{b^2-a c}}}\right\}$

And then we compare the two equations:

Simplify[sol[[2]] == FCT[h]]
(* True *)

This is not to say that the additional conditions ($a>0$, $b>0$, and $c>0$) are essential to the solution. It's only that Mathematica simplifies things enough in that case to show equality.

By leaving off those additional restrictions the resulting equation (sol[[2]]) is (I think) what you want but needs to be simplified more "by hand" as it involves simplifications under square roots. At least how to tell Mathematica to simplify those things more automatically is beyond what I know how to do.

$\endgroup$

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.