Nonlinear Differential Equation with Initial Condition
Solve this nonlinear differential equation with an initial condition. The equation has multiple solutions.
Solve this nonlinear differential equation with an initial condition. The equation has multiple solutions.
Download the file nonldiff1.m
% Nonlinear Differential Equation with Initial Condition
%Solve this nonlinear differential equation with an initial condition.
%The equation has multiple solutions.
% initial conditions: y(t0) = y0
syms y(t) t0 y0
ode = (diff(y,t)+y)^2 == 1;
cond = y(t0) == y0;
ySol(t) = dsolve(ode,cond)
The matlab output:
ySol(t) =
exp(-t)*exp(t0)*(y0 + 1) - 1
exp(-t)*exp(t0)*(y0 - 1) + 1
No comments:
Post a Comment