Mathematica 微分方程初始条件问题
来源:学生作业帮 编辑:作业帮 分类:数学作业 时间:2024/05/22 01:01:14
Mathematica 微分方程初始条件问题
Mathematica解微分方程时,加了初始条件出错!为什么?
如:
In[1]=DSolve[{y'[x]+y[x]==aSin[x],y[0]==0},y[x],x]
DSolve::deqn:Equation or list of equations expected instead of True in the first argument {y[x]+y'[x]==aSin[x],True}.>>
Out[1]=DSolve[{y[x]+y'[x]==aSin[x],True},y[x],x]
Mathematica解微分方程时,加了初始条件出错!为什么?
如:
In[1]=DSolve[{y'[x]+y[x]==aSin[x],y[0]==0},y[x],x]
DSolve::deqn:Equation or list of equations expected instead of True in the first argument {y[x]+y'[x]==aSin[x],True}.>>
Out[1]=DSolve[{y[x]+y'[x]==aSin[x],True},y[x],x]
In[286]:= DSolve[{y'[x] + y[x] == a*Sin[x],y[0] == 0},y[x],x]
Out[286]= {{y[x] -> -(1/2) a E^-x (-1 + E^x Cos[x] - E^x Sin[x])}}
未发现问题;
In[287]:= y[0] = 0;
DSolve[{y'[x] + y[x] == a*Sin[x],y[0] == 0},y[x],x]
DSolve::deqn:Equation or list of equations expected instead of True in the first argument {y[x]+y'[x]==aSin[x],True}.>>
Out[288]=DSolve[{y[x]+y'[x]==aSin[x],True},y[x],x]
发现问题;
说明是你在写方程之前,已经在什么时候对y[0]赋过值了.
你可以改成下面的形式,即使以前对y赋过值,也不会出错了.
Remove[y];
DSolve[{y'[x] + y[x] == a*Sin[x],y[0] == 0},y[x],x]
Out[286]= {{y[x] -> -(1/2) a E^-x (-1 + E^x Cos[x] - E^x Sin[x])}}
未发现问题;
In[287]:= y[0] = 0;
DSolve[{y'[x] + y[x] == a*Sin[x],y[0] == 0},y[x],x]
DSolve::deqn:Equation or list of equations expected instead of True in the first argument {y[x]+y'[x]==aSin[x],True}.>>
Out[288]=DSolve[{y[x]+y'[x]==aSin[x],True},y[x],x]
发现问题;
说明是你在写方程之前,已经在什么时候对y[0]赋过值了.
你可以改成下面的形式,即使以前对y赋过值,也不会出错了.
Remove[y];
DSolve[{y'[x] + y[x] == a*Sin[x],y[0] == 0},y[x],x]
matlab 用ode45解决二元微分方程,有两个初始条件
求微分方程满足所给初始条件的特解
mathematica 微分方程作图
用mathematica解决微分方程
求可分离变量微分方程满足所给初始条件的特解
求微分方程满足所给初始条件的特解 第三题.
高数,求下列微分方程满足初始条件的特解第二题的第二题
问一道微分方程的问题(1/根号下(y^2-1))dy=±dx这是一个变量分离的方程,两端求积分,并代入初始条件y(1)=
Mathematica中解偏微分方程的命令
Mathematica问题
求微分方程dx/y+dy/x=0满足初始条件y(4)=2特解的为?
求解微分方程dy/dx=2xy,满足初始条件:x=0,y=1的特解