1
$\begingroup$

I am working right now in this another question by doing examples and I got stuck in proving the results I found through Wolfram-Alpha are right.

The main differential equation is the following ODE: $$y''(t)+\dfrac{2y(t)}{\left(1-t\right)} + \dfrac{2y'(t)}{\left(1-t\right)} = 0,\quad y[0]=\frac14,\,y'[0]=\frac14\tag{Eq. 1}\label{Eq. 1}$$

Wolfram-Alpha do solves the differential equation but with a mess of complex-valued constants terms made by Bessel functions, which also using Wolfram-Alpha I think could be reduced to:

$$y(t) = \dfrac{\sqrt{(t-1)^3}}{2\sqrt{2}}\biggr(\left(2J_2(2\sqrt{2})+\sqrt{2}J_3(2\sqrt{2})\right)K_3(2\sqrt{2-2t}) - \left(2K_2(2i\sqrt{2})+i\sqrt{2}K_3(2i\sqrt{2})\right)I_3(2\sqrt{2-2t})\biggr)\tag{Eq. 2}\label{Eq. 2}$$

Wolfram-Alpha

But since the huge number of characters, I am unable to verify in Wolfram-Alpha if the solution of \eqref{Eq. 2} is do solving \eqref{Eq. 1}, neither I am able to use Desmos since it get stuck with imaginary numbers.

I want to know if using Mathematica you could verify the following, for two regimes, if the solution is solving the ODE for all time, and if it is solving the ODE on times $0\leq t \leq 1$, for the ODE of \eqref{Eq. 1} as also for the following different ODE Wolfram-Alpha:

$$y''(t)+\operatorname{sgn}(y(t))\sqrt{|y(t)|}+\operatorname{sgn}(y'(t))\sqrt{|y'(t)|}=0\tag{Eq. 3}\label{Eq. 3}$$

Numerical verification are welcomed (I hope with plots). Thanks beforehand.

$\endgroup$
2
  • $\begingroup$ People here generally like users to post code as copyable Mathematica code as well as images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find the meta Q&A, How to copy code from Mathematica so it looks good on this site, helpful $\endgroup$ Commented Jul 23 at 3:32
  • $\begingroup$ @MichaelE2 I incorporated the links from Wolfram-Alpha: there the formulas could be taken by copy-paste. I hope is enough. The Latex could be taken from the Edit tab. $\endgroup$ Commented Jul 23 at 3:45

1 Answer 1

1
$\begingroup$
ClearAll[y,t]
ode = y''[t] + 2*y[t]/(1 - t) + 2*y'[t]/(1 - t) == 0
ic = {y[0] == 1/4, y'[0] == 1/4}
sol = DSolve[{ode, ic}, y, t]

enter image description here

ode /. sol // FullSimplify

(* {True} *)

ic /. sol // FullSimplify

(* {{True, True}} *)

Verified

To plot

 Plot[sol[[1, 1, 2, 2]], {t, 0, 1}]

enter image description here

V 14.2.1

Reply to comment:

Mathematica can't solve your second ode analytically. But numerically it can. Using same IC for your first ode, and from $t=0\dots 1$ the solution does not look like anything of the first ode. Here is the code. you can try it yourself also and see.

ClearAll[y, t]
ode = y''[t] + Sign[y[t]]*Sqrt[Abs[y[t]]] - 
   Sign[y'[t]]*Sqrt[Abs[y'[t]]] == 0
ic = {y[0] == 1/4, y'[0] == 1/4}
sol = NDSolve[{ode, ic}, y, {t, 0, 1}]

enter image description here

Plot[Evaluate[y[t] /. sol], {t, 0, 1}]

enter image description here

$\endgroup$
6
  • $\begingroup$ Does the solution solve $\text{Eq. 3}$ at least on $0<t<1$? $\endgroup$ Commented Jul 23 at 3:46
  • $\begingroup$ Also I don't know why it show the formula like that, as example, if you take the denominator and imput it again it becomes reduced to just $-4i\sqrt{2}$ $\endgroup$ Commented Jul 23 at 3:48
  • 1
    $\begingroup$ @Joako Does the solution solve Eq. 3 at least on 0<t<1 Mathematica Could not verify this. $\endgroup$ Commented Jul 23 at 3:53
  • $\begingroup$ Thanks for the answer, by the way. To verify differential equations I plotted them in Demos, but now I cannot since there are imaginary terms in the function: Do you believe it is posible to declare the solution $y(t)$ you shared and plot $F(y,t) = y''(t)+\operatorname{sgn}(y(t))\sqrt{|y(t)|}+\operatorname{sgn}(y'(t))\sqrt{|y'(t)|}$ to see how it behaves near $t=[0,\ 1]$? $\endgroup$ Commented Jul 23 at 19:44
  • 2
    $\begingroup$ @Joako fyi, added plot of solution of your second ode. You can see the solution is different from the first ode. $\endgroup$ Commented Jul 23 at 20:08

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.