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.
C
. use lower casec
. 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$NDSolve
. I do not think you can do this analytically. The solution to the ODE is just too complicated, even for Mathematica. $\endgroup$