The ODE in question: y'' + 3y' + 2y = 8t + 8
But I get something like this for my solution:
I also tried getting the solution of y'=y^2-y^3
but again the solution did not make sense to me.
You should use ==
instead of =
to define the equations:
DSolve[y''[t] + 3 y'[t] + 2 y[t] == 8 t + 8, y, t]
(*{{y -> Function[{t}, 2 (-1 + 2 t) + E^(-2 t) C[1] + E^-t C[2]]}}*)
...,y[t],t]
The form I used has several advantages (see the documentation) because DSolve[…,y,t]
returns a pure function: "With a pure function output, eqn/. {y->...} can be used to verify the solution"
$\endgroup$
Commented
Aug 13, 2020 at 14:57
"The ODE in question: y'' + 3y' + 2y = 8t + 8"
is a linear inhomogeneous ordinary differential equation with real constant coefficients. The inhomogeneity is a linear polynomial with constant real coefficients.
Solution:
DSolve[y''[t] + 3 y'[t] + 2 y[t] == 8 t + 8, y, t]
(*{{y -> Function[{t}, 2 (-1 + 2 t) + E^(-2 t) C[1] + E^-t C[2]]}}*)
using DSolve.
The corresponding mathematical understanding is: a) solve the homogeneous equation.
DSolve[y''[t] + 3 y'[t] + 2 y[t] == 0, y, t]
{{y -> Function[{t}, E^(-2 t) C[1] + E^-t C[2]]}}
b) solve the corresponding inhomogeneous equation by variation of constants. That is already done using DSolve. In proper mathematical work, this would be setting the coefficient functions dependent on t and differentiate and then match the coefficients.
To complete degrees of freedom in constants of the solution is that of the order of the linear inhomogeneous ordinary differential equation with real constant coefficients. That is two regarding to the second-order of the linear inhomogeneous ordinary differential equation with real constant coefficients.
The varied coefficient functions are completely defined by the inhomogeneity.
There are different formalisms available to solve that in mathematics.
Probe:
D[2 (-1 + 2 t) + E^(-2 t) C[1] + E^-t C[2], t, t] +
3 D[2 (-1 + 2 t) + E^(-2 t) C[1] + E^-t C[2], t] +
2 (2 (-1 + 2 t) + E^(-2 t) C[1] + E^-t C[2])
4 E^(-2 t) C[1] + E^-t C[2] + 3 (4 - 2 E^(-2 t) C[1] - E^-t C[2]) + 2 (2 (-1 + 2 t) + E^(-2 t) C[1] + E^-t C[2])
% // FullSimplify
8 (1 + t)
So the solution from DSolve solves really the linear inhomogeneous ordinary differential equation with real constant coefficients.
part of the question
DSolve[y'[t] == y[t]^2 - y[t]^3, y, t]
{{y -> Function[{t},
InverseFunction[Log[1 - #1] - Log[#1] + 1/#1 &][-t + C[1]]]}}
This is a homogeneous nonlinear ordinary differential equation polynomial in the differentiated function and of order one. The ODE is separable and has therefore an exact solution.
y'==dy/dt==y^2-y^3
separates into
dt=dy/(y^2-y^3)
t-t0==Integrate[1/(y^2-y^3),y]
t-t0==-(1/y) - Log[1 - y] + Log[y]
As shown be DSolve there is not closed inverse function.
==
instead of=
to define the equations! $\endgroup$y
is already defined.ClearAll[y]
might do the trick. This is a general advice: If something doesn't work, restart the kernel. $\endgroup$