2
$\begingroup$

I am very new to Mathematica and already spent a lot of time trying to do this but failed.

I am trying to solve an ODE:

solution = DSolve[{-((m (1 + m) + 4/(9 (-2/3 + t) t)) y[t]) + 
     2 (-1/3 + t) y'[t] + (-2/3 + t) t y''[
       t] == (-4 (1 + C/2))/(9 (-2/3 + t) t), y[1] == 1, y'[1] == C}, 
  y, t]

where $m$ is a nonnegative integer and $C$ is a real number.

I want to show that there exists a $C$ such that the solution is $0$ at infinity. When I try that code:

Limit[y[t] /. solution[[1]], t -> Infinity, m \[Element] Integers]

it just spits out the same thing.

What should I do? (Note that I don't need to find that value of $C$; I just need to show that for every $m$, there is a number $C$ in which the solution vanishes at infinity. )

EDIT:

I amanged to get that it's true for many values of $m$. Here is the code I used for $m=10$.

solutionm = 
 DSolve[{-((10 (10 + 1) + 4/(9 (-2/3 + t) t)) y[t]) + 
     2 (-1/3 + t) y'[t] + (-2/3 + t) t y''[
       t] == (-4 (1 + C/2))/(9 (-2/3 + t) t), y[1] == 1, y'[1] == C}, 
  y, t]
Limit[FullSimplify[Re[y[t] /. solutionm[[1]]]], t -> Infinity, 
 Assumptions -> C \[Element] Reals]

Which spits out:

DirectedInfinity[360 (1036 - 943 Log[3]) + C (-59572 + 54225 Log[3])]

Then I choose the $C$ that makes that number in "DirectedInfinity" zero:

{a} = Solve[360 (1036 - 943 Log[3]) + C (-59572 + 54225 Log[3]) == 0, 
  C]
a = C /. a[[1]]

Then when $C=a$, the limit is 0:

Limit[Re[y[t] /. solutionm[[1]]], t -> Infinity, 
 Assumptions -> C == a]
0

I tried for many values of $m$, and I get the same thing. When I try to make $m$ arbitrary, something weird happens:

$Assumptions={m \[Element] Integers, C \[Element] Reals}
solutionm = 
 DSolve[{-((m (m + 1) + 4/(9 (-2/3 + t) t)) y[t]) + 
     2 (-1/3 + t) y'[t] + (-2/3 + t) t y''[
       t] == (-4 (1 + C/2))/(9 (-2/3 + t) t), y[1] == 1, y'[1] == C}, 
  y, t]

When I run y[t] /. solutionm[[1]] /. {m -> 1}, it gives me an error: Power::infy: Infinite expression 1/0 encountered. I get the same error with any $m$. I am not sure why this happens.

Also, when I repeat the same thing as above, and run

Limit[FullSimplify[Re[y[t] /. solutionm[[1]]]], t -> Infinity, 
 Assumptions -> C \[Element] Reals]

it doesn't compute the limit. It just spits out the same thing. Is there a way around this? Or, as Nasser suggested, is this too complicated for Mathematica? Also, I don't need to find that $C$. I just want to show that there exists a $C$ in which the solution vanishes at infinity.

$\endgroup$
4
  • $\begingroup$ better not to use C. use lower case c. But have you looked at how complicated the solution of the ODE is? it is pages and pages of special functions and integrals as well inside. !Mathematica graphics Mathematica is not a magic box although many think it is. $\endgroup$
    – Nasser
    Commented Sep 3, 2021 at 21:22
  • $\begingroup$ It's not too long when simplified. wolframalpha.com/input/… $\endgroup$
    – Laithy
    Commented Sep 3, 2021 at 21:32
  • $\begingroup$ How do I make a code to get the limit, and find if there is a C such that the limit is 0? $\endgroup$
    – Laithy
    Commented Sep 3, 2021 at 21:38
  • $\begingroup$ You could try numerical simulation, with different values and change time. Using Manipulate for example. Using NDSolve. I do not think you can do this analytically. The solution to the ODE is just too complicated, even for Mathematica. $\endgroup$
    – Nasser
    Commented Sep 4, 2021 at 1:07

2 Answers 2

1
$\begingroup$

Here is an answer for m==2 in version 13.1 on Windows 10 (C is reserved in WL.)

ClearAll[m, c]; $Assumptions = {m \[Element] Integers, c \[Element] Reals}; m = 2;
solution = AsymptoticDSolveValue[{-((m (m + 1) + 4/(9 (-2/3 + t) t)) y[t]) + 
  2 (-1/3 + t) y'[t] + (-2/3 + t) t y''[t] ==
 (-4 (1 + c/2))/(9 (-2/3 + t) t), y[1] == 1, y'[1] == c}, y[t], {t, Infinity, 1}];
Limit[solution, t -> Infinity]

\[Infinity] (48-36 Log[3]+c (-68+63 Log[3]))

Now

Solve[(48 - 36 Log[3] + c (-68 + 63 Log[3])) == 0, c]

{{c -> (-48 + 36 Log[3])/(-68 + 63 Log[3])}}

and then

ClearAll[m, c]; m = 2; c = (-48 + 36 Log[3])/(-68 + 63 Log[3]);
solution = AsymptoticDSolveValue[{-((m (m + 1) + 4/(9 (-2/3 + t) t)) y[t]) + 
  2 (-1/3 + t) y'[t] + (-2/3 + t) t y''[
    t] == (-4 (1 + c/2))/(9 (-2/3 + t) t), y[1] == 1, y'[1] == c},
y[t], {t, Infinity, 1}];
Limit[solution, t -> Infinity]

0

A similar behavior for other natural m I tried. In the general case AsymptoticDSolveValue fails.

$\endgroup$
0
$\begingroup$

We can have an insight about the solutions behavior for each m by doing

tmax = 1000;
solution = ParametricNDSolve[{-((m (1 + m) + 4/(9 (-2/3 + t) t)) y[t]) + 2 (-1/3 + t) y'[t] + (-2/3 + t) t y''[t] == (-4 (1 + c/2))/(9 (-2/3 + t) t), y[1] == 1, y'[1] == c}, y, {t, 1, tmax}, {m, c}]

m = 1;

Plot3D[Evaluate[y[m, c][t] /. solution], {t, 1, tmax}, {c, -6, 0}]
$\endgroup$
1
  • $\begingroup$ I want to understand the behaviour of the solution at infinity though. So numerical methods doesn't help. Also I managed to get what I want when I specify what $m$ is. But I am not sure how to proceed if I want to prove it for any m. $\endgroup$
    – Laithy
    Commented Sep 4, 2021 at 17:37

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.