0
$\begingroup$

I am abit confused, in my definition for General Solution (definition which we used on Universitet) it say's for " $C \in Reals $ " and ever when i solving ordinary differential equation of first order i never get general solution or general integral in Complex shape ( with i ... ).

For example Riccati differential equation $$y' = (y^2) - 2 x^2 y + (x^4) + 2 x + 4$$

I was solving on my study like this

https://imgur.com/a/ngnMdDv

$$ arctg(\frac{y-x^2}{2})-2x=C $$ and there i stop on my class .

When i try with DSolve , DSolve get me DSolve[y'[x] == y[x]^2-2x^2*y[x]+x^4+2x+4, y[x], x]

$$ \left\{\left\{y(x)\to \frac{1}{c_1 e^{4 i x}-\frac{i}{4}}+x^2-2 i\right\}\right\}$$ Complex General solution in explicit shape !

When i try to Derivate that and etc i see that what DSolve gave me is rly Solution , but in my definition of General Solution in d.e its not!

My question is :

  1. Is that what DSolve gived me General Solution, what is your definition of General Solution

On my studing , we use next definition : Function $y=\varphi(x,c), x \in (a,b) , C \in H \subset R$, where is C parametar is GENERAL SOLVE d.e y'=f(x,y) if :

1) equation $y=\varphi(x,c)$ can be solved for C, like $C=\Psi(x,y), \forall (x,y) \in G$ (G is region of unique)

2)Function $y=\varphi(x,c)$ is solve d.e $y'=f(x,y)$ in G for every $C \in H$ where is $C=\Psi(x_y,y_0) $ for any $(x_0,y_0) \in G$

  1. Why DSolve gave me General Solution in that Complex shape , how DSolve works? If DSolve worked with subtitute, it would get General integral like me $ arctg(\frac{y-x^2}{2})-2x=C $ , then because DSolve want this equation in EXPLICIT shape , next step would be $ arctg(\frac{y-x^2}{2})=C + 2x$ then $ \frac{y-x^2}{2}=Tangens(C + 2x)$ and explicit form $$ y=2* Tangens(C + 2x) + x^2 $$ ..
$\endgroup$
  • $\begingroup$ Nasser, i know that in second-order differential equations we get Complex, but when i working manual first-order differential equations , i never saw general solution in Complex shape. I will edite now my question (explain how get General Integral and write definition of general solution ) . $\endgroup$ – Милош Вучковић Dec 2 '18 at 2:17
  • $\begingroup$ Well if i didnt make any mistake in my step's it's for sure Solution ... $\endgroup$ – Милош Вучковић Dec 2 '18 at 3:07
  • 1
    $\begingroup$ I find the question hard to read. Is the main question why M gives a solution that is a complex-valued function of a complex-variable instead of the form you desire as a real-valued function of a real variable? (The exact solvers of M work over the complex numbers by default.) Or are you claiming the DSolve solution is not a general solution? $\endgroup$ – Michael E2 Dec 2 '18 at 15:04
3
$\begingroup$

I'm not sure what's being asked, but I can think of two things to answer:

First, Mathematica's exact solvers solve systems over the complex numbers.

Second, if a way to transform the DSolve solution to the OP's desired form is being sought, if only to show the relationship between them, here is a sequence of steps that accomplishes that:

dsol = First@ DSolve[ode = y'[x] == y[x]^2 - 2 x^2*y[x] + x^4 + 2 x + 4, y, x]
cvt = First@ Solve[ 2 Tan[C[2] + 2 x] + x^2 == (y[x] /. dsol) /. {x -> 0}, C[1]]
intermediate = dsol /. cvt
y == (y[x] /. intermediate) // ExpToTrig // Simplify
(*
  {y -> Function[{x}, -2 I + x^2 + 1/(-(I/4) + E^(4 I x) C[1])]}
  {C[1] -> -(1/4) I Cos[2 C[2]] + 1/4 Sin[2 C[2]]}
  {y -> Function[{x}, -2 I + x^2 + 
      1/(-(I/4) + E^(4 I x) (-(1/4) I Cos[2 C[2]] + 1/4 Sin[2 C[2]]))]}
  x^2 + 2 Tan[2 x + C[2]] == y
*)

One of the differences in the two forms is that the constant C[1] of DSolve ranges over ${\Bbb{CP}}^1$ and the OP's constant C[2] ranges over a generic subset of $S^1 \equiv {\Bbb R}/2\pi{\Bbb Z}$ or $S^1 \times \big(i\,{\Bbb{R}\cup\{\pm i\infty\}\big)}$. Topologically, the DSolve solution is perhaps simpler.

$\endgroup$

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