1

If we consider the BVP $y^{\prime\prime}(t)=\frac{3}{2}y(t)^{2}$ where $0\leq t\leq1$ and $y(0)=4$ and $y(1)=1$. Then its solution is $y(t)=\frac{4}{(1+t)^{2}}$. I have set the BVP above as in mathemtica,

DSolve[{y''[t]==(3/2)(y[t])^2},y[0]==4,y[1]=1},y[x],x,0<= t <= 1]

When I run Mathemtica it says that DSolve::dsvar: $0\leq t\leq 1$ cannot be used as a variable.

Junaid
  • 161
  • 6
  • 1
    There are 6 typos in one line of your code. Using sol = DSolve[{y''[t] == (3/2) (y[t])^2}, y[t], t], we have out {{y[t] -> 2^(2/3) WeierstrassP[(t + C[1])/2^(2/3), {0, C[2]}]}}. – Alex Trounev Feb 22 '22 at 04:15
  • Welcome to the Mathematica Stack Exchange. To get started with Mathematica, please check out the book written by the inventor. – Syed Feb 22 '22 at 04:28
  • Dears, thanks for you help and suggesions. Please I have still issue in this equation solving. This example has been published in the paperhttps: //doi.org/10.1016/j.aml.2018.02.016 – Junaid Feb 22 '22 at 10:00
  • Here you can find solution to a more general equation ( setting $a=0,; b=0,; c=3/2$ you obtain your equation.) Symolically with DSolve one cannot solve BVP for this typ of ODE, however with a simple reasoning you can find the only one solution to the given problem. Nevertheless you incorrectly put 0 <= t <=1, one can evaluate e.g. DSolve[{y''[t] == (3/2) y[t]^2}, y[t], {t, 0, 1}]. – Artes Feb 22 '22 at 11:10
  • Does this solve your problem How to solve a nonlinear second order ODE. In fact this is a duplicate for the reason mentioned above in my comment. – Artes Feb 22 '22 at 11:13

1 Answers1

1

One way is:

SOL = DSolve[{y''[t] == (3/2) (y[t])^2}, y[t], t](*General solution*)

F = FindRoot[{(y[t] /. SOL[[1]] /. t -> 0 /. C[1] -> c1 /. C[2] -> c2) == 4, (y[t] /. SOL[[1]] /. t -> 1 /. C[1] -> c1 /. C[2] -> c2) == 1}, {c1, 1/2}, {c2, 1/2}] // Chop // Rationalize (Finding constans c1 and c2)

SOL /. C[1] -> c1 /. C[2] -> c2 /. F(Paste constans c1 and c2 to general solution)

({{y[t] -> 4/(1 + t)^2}})

Mariusz Iwaniuk
  • 13,841
  • 1
  • 25
  • 41