how to solve this equastion : y''-1=exp(x) second order diff. equastion by use matlab command please reply

조회 수: 1 (최근 30일)
how to solve this equastion : y''-1=exp(x) second order diff. equastion please reply
  댓글 수: 1
Torsten
Torsten 2018년 9월 6일
y'' = 1 + exp(x)
-> y' = x + exp(x) + a1
-> y = 1/2*x^2 + exp(x) + a1*x + a2
a1, a2 are arbitrary constants to be deduced from the initial/boundary conditions.
Best wishes
Torsten.

댓글을 달려면 로그인하십시오.

답변 (1개)

Dimitris Kalogiros
Dimitris Kalogiros 2018년 9월 6일
Of course , Trosten gave the solution for this ODE, but maybe it worths to have a look on how we can use symbolic maths toolbox to handle these equations:
clear; clc;
syms x y(x)
syms a_0 a_1
Dy=diff(y,x) %definition of first derivative
ode=diff(y,x,2)-1==exp(x) % definition of 2nd order ODE
cond1=y(0)==a_0 % initial conditions
cond2=Dy(0)==a_1
ySol(x)=dsolve(ode, [cond1 cond2]) %solve ODE
And if someone run this script, will receive :

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by