Second order, nonlinear differential equation help

cpyles1
Messages
1
Reaction score
0
I've been trying to solve this one for a while. My professor wasn't even sure how to do it. Any suggestions?
y''+t*y+y*y'=sin(t)
 
Physics news on Phys.org
cpyles1 said:
I've been trying to solve this one for a while. My professor wasn't even sure how to do it. Any suggestions?
y''+t*y+y*y'=sin(t)

Yeah. How about a power series solution? Huh? What do you mean that yy' thing? No? How about the Mathematica code below then. Looks pretty close to me.

Code:
Remove[a];

nmax = 25; 

myleftside = Sum[n*(n - 1)*Subscript[a, n]*t^(n - 2), {n, 0, nmax}] + 
    Sum[Subscript[a, n - 3]*t^(n - 2), {n, 3, nmax + 2}] + 
    Sum[Subscript[a, k]*Subscript[a, n - k]*(n - k)*t^(n - 1), {n, 0, nmax + 1}, {k, 0, n}]; 

myrightside = Sum[((-1)^n*t^(2*n + 1))/(2*n + 1)!, {n, 0, nmax}]; 

myclist = Flatten[Table[Solve[Coefficient[myleftside, t, n] == Coefficient[myrightside, t, n], 
      Subscript[a, n + 2]], {n, 0, nmax}]]; 

Subscript[a, 0] = 0; 
Subscript[a, 1] = 1; 

mysec = Table[Subscript[a, n] = Subscript[a, n] /. myclist, {n, 2, nmax}]; 

thef[t_] := Sum[Subscript[a, n]*t^n, {n, 0, nmax}];

p1 = Plot[thef[t], {t, 0, 2}, PlotStyle -> Red];

mysol = NDSolve[{Derivative[2][y][t] + t*y[t] + y[t]*Derivative[1][y][t] == Sin[t], y[0] == 0, 
    Derivative[1][y][0] == 1}, y, {t, 0, 2}];

p2 = Plot[y[t] /. mysol, {t, 0, 2}, PlotStyle -> Blue];

Show[{p1, p2}]
 
Last edited:
There is the following linear Volterra equation of the second kind $$ y(x)+\int_{0}^{x} K(x-s) y(s)\,{\rm d}s = 1 $$ with kernel $$ K(x-s) = 1 - 4 \sum_{n=1}^{\infty} \dfrac{1}{\lambda_n^2} e^{-\beta \lambda_n^2 (x-s)} $$ where $y(0)=1$, $\beta>0$ and $\lambda_n$ is the $n$-th positive root of the equation $J_0(x)=0$ (here $n$ is a natural number that numbers these positive roots in the order of increasing their values), $J_0(x)$ is the Bessel function of the first kind of zero order. I...
Are there any good visualization tutorials, written or video, that show graphically how separation of variables works? I particularly have the time-independent Schrodinger Equation in mind. There are hundreds of demonstrations out there which essentially distill to copies of one another. However I am trying to visualize in my mind how this process looks graphically - for example plotting t on one axis and x on the other for f(x,t). I have seen other good visual representations of...

Similar threads

Back
Top