Error using dsolve function while solving differential Equation

조회 수: 11 (최근 30일)
Preethika
Preethika 2014년 7월 16일
답변: Mischa Kim 2014년 7월 16일
Trying to solve a equation with its boundary conditions But an error message occurs in dsolve function??
Equation used : 1*D2y(x)+2*Dy(x)-3*y(x)=6 y(2)=4 y(0)=
Pls help me??

답변 (1개)

Mischa Kim
Mischa Kim 2014년 7월 16일
Preethika, I do not know how you implemented it, so here is one approach:
syms y(x)
Dy = diff(y);
D2y = diff(y,2);
% Define differential equation
my_DE = D2y + 2*Dy - 3*y == 6;
% Set initial conditions
y0 = y(0) == 0;
y2 = y(2) == 4;
% Solve differential equation and display
y_sol = dsolve(my_DE, y0, y2)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by