HP Forums
Simplify differential equation - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Simplify differential equation (/thread-3008.html)



Simplify differential equation - salvomic - 02-04-2015 11:31 PM

hi all,
I would like resolve this differential equation (Bernoulli) with Prime:
y'=t^3y^2+2ty, t, y directly (without substitution).
\( y'=t^{3}y^{2}+2ty \)
My book give general solution: y(t)=1/(ce^(t^2)-(2+t^2))
\( y(t)=\frac{1}{ce^{t^{2}}-(2+t^{2}) } \)
Prime give (e^(-t^2)*(-½*e^(t^2)*(t^2-1)+G_0)^-1.
\( e^{-t^{2}}(-\frac{1}{2}e^{t^{2}}(t^{2}-1+G_0)^{-1} \)
I cannot simplify it or collect and so on to get the same result as the book.
Any hint to get the work with calculator?

Thank you.


RE: Simplify differential equation - parisse - 02-05-2015 07:21 AM

[a]:=desolve(diff(y,t)=t^3*y^2+2t*y,t,y);
then lin(a) returns (-1/2*(t^2-1)+c_0*exp(-t^2))^-1
I don't think it's the same as your book.
simplify(diff(a,t)-(t^3*a^2+2t*a) returns 0, but
b:=1/(c*e^(t^2)-(2+t^2))
simplify(diff(b,t)-(t^3*b^2+2t*b))
does not return 0.
Perhaps you made a mistake in entering the equation, or the book solution is wrong.


RE: Simplify differential equation - salvomic - 02-05-2015 03:38 PM

(02-05-2015 07:21 AM)parisse Wrote:  [a]:=desolve(diff(y,t)=t^3*y^2+2t*y,t,y);
then lin(a) returns (-1/2*(t^2-1)+c_0*exp(-t^2))^-1
I don't think it's the same as your book.
simplify(diff(a,t)-(t^3*a^2+2t*a) returns 0, but
b:=1/(c*e^(t^2)-(2+t^2))
simplify(diff(b,t)-(t^3*b^2+2t*b))
does not return 0.
Perhaps you made a mistake in entering the equation, or the book solution is wrong.

I hadn't thought to lin()! ...

I've controlled in Wolfram Alpha, and I got y(t) = -(2 e^(t^2))/(c_1+e^(t^2) (t^2-1)):

\( y(t)=\frac{-2e^{t^{2}}}{c_1+e^{t^{2}}(t^{2}-1)} \)

(Wolfram web page says "Riccati equation", truly is a Bernoulli eq. form: y'=p(t)y^\alpha+q(t)y, as the Riccati one is a particular form with y'=p(t)y^2+q(t)y+r(t)...)
The same solution of Prime, if I'm not wrong, so could be an error in the book...

The book suggest to put \( z=y^{(1-\alpha)} \) and in this case give for \( z'=-(2tz+t^{3}) \) the solution \( z(t)=ce^{t^{2}}-(2+t^{2}) \), so the solution of the principal equation is \( \frac{1}{z(t)} \); however with Prime I get for it \( z(t)=\frac{1}{2}(-t^{2}+2*G_0e^{-t^{2}}+1) \)
...

Thank you for your patience!

Salvo

EDIT: rewrite something in LaTEX for clarity


RE: Simplify differential equation - lrdheat - 02-05-2015 05:47 PM

My TI NSpire and CASIO Classpad 400 come up with answers that agree with the book.

The TI answers (-2e^t^2)/((t^2-1)(e^t^2)-2c1)) I added ()'s to make this clearer.

The CASIO Classpad 400 produces a similar result.


RE: Simplify differential equation - salvomic - 02-05-2015 05:54 PM

(02-05-2015 05:47 PM)lrdheat Wrote:  My TI NSpire and CASIO Classpad 400 come up with answers that agree with the book.

The TI answers (-2e^t^2)/((t^2-1)(e^t^2)-2c1)) I added ()'s to make this clearer.

The CASIO Classpad 400 produces a similar result.

So where is the truth? Smile
Prime and Wolfram or ...Book, TI and Classpad?

Ora both solution are valid?
I'm a bit confused, now...


RE: Simplify differential equation - lrdheat - 02-05-2015 07:11 PM

The wolfram result is the same as the TI (nearly identical form) and to the CASIO.


RE: Simplify differential equation - parisse - 02-05-2015 07:14 PM

lrdheat, the solution you give does not work unless I make a mistake
c:=-2*exp(t^2)/((t^2-1)*(exp(t^2)-2*c1));
simplify(diff(c,t)-(t^3*c^2+2*t*c)) does not return 0.
(t^2-1) should not be in factor.
Solving by hand, set z=1/y, z'=-y'/y^2=-(t^3*y^2+2*t*y)/y^2=-t^3-2*t*z is linear in z. General solution w/o second member z=K*exp(-t^2), z=(1-t^2)/2 is a particular solution, general solution in z=(1-t^2)/2+K*exp(-t^2), then y=1/z. Xcas/Prime solution is indeed correct


RE: Simplify differential equation - Han - 02-05-2015 07:43 PM

(02-05-2015 05:47 PM)lrdheat Wrote:  My TI NSpire and CASIO Classpad 400 come up with answers that agree with the book.

The TI answers (-2e^t^2)/((t^2-1)(e^t^2)-2c1)) I added ()'s to make this clearer.

The CASIO Classpad 400 produces a similar result.

According to the original post, the book solution is:
\[ y(t)=\frac{1}{ce^{t^2}-(2+t^2)} \]
If that is indeed what your book says, then it is wrong. You can check that against any CAS (even the TI).

Note that
\[ y(t) = \frac{-2e^{t^2}}{(t^2-1)e^{t^2}-2c1} \]
is the same as the HP Prime's
\[ y(t) = \frac{1}{\frac{1}{2}(-t^2+2G_0e^{-t^2}+1)} \]
by multiplying the the HP Prime's answer by \( \frac{-2e^{t^2}}{-2e^{t^2}} \)

parisse Wrote:lrdheat, the solution you give does not work unless I make a mistake
c:=-2*exp(t^2)/((t^2-1)*(exp(t^2)-2*c1));

It appears you put the parenthesis in the denominator around \( e^{t^2}-2c1 \) when it should only be on \( e^{t^2} \). lrdheat's post has mismatched ()'s

http://www.wolframalpha.com/input/?i=dsolve%28y%27%3Dt%5E3*y%5E2%2B2*t*y%29%3B

Quote:The book suggest to put \( z=y^{(1-\alpha)} \) and in this case give for \( z'=-(2tz+t^{3}) \) the solution \( z(t)=ce^{t^{2}}-(2+t^{2}) \),

http://www.wolframalpha.com/input/?i=dsolve%28z%27%3D-%282*z*t%2Bt%5E3%29


RE: Simplify differential equation - lrdheat - 02-05-2015 08:26 PM

Thanks Han for the correction.

The TI is correct, and actually, the CASIO Classpad 400 produces Han's result with the closest fidelity...it has the same numerator, and in the denominator, has t^2 *e^t^2 - e^t^2 -2*const(1) i.e., the CASIO did not factor out e^t^2 in the denominator.


RE: Simplify differential equation - salvomic - 02-05-2015 08:27 PM

(02-05-2015 07:43 PM)Han Wrote:  http://www.wolframalpha.com/input/?i=dsolve%28z%27%3D-%282*z*t%2Bt%5E3%29

yes, I agree, the book is wrong in the middle equation (that in "z"), as Prime highlight, so the final result in the book was wrong also.
Now is all more clear.