# 常微分方程式の解の式を直接得る

DSolveValueを使って，常微分方程式の解に対する式を直接得る．

 In[1]:= Xsol = DSolveValue[{Derivative[1][y][x] + y[x] == a Sin[x], y[0] == 0}, y[x], x]
 Out[1]=

 In[2]:= XPlot[Evaluate[Table[sol, {a, 7}]], {x, 0, 4 \[Pi]}]
 Out[2]=

 In[3]:= XDSolveValue[{(y^\[Prime]\[Prime])[x] + y[x] == 0, y[0] == 0, Derivative[1][y][0] == 1}, Derivative[1][y][x], x]
 Out[3]=

 In[4]:= XDSolveValue[{Derivative[1][y][x] == x y[x], Derivative[1][z][x] == 5 z[x], y[0] == 3, z[0] == 5}, y[x], x]
 Out[4]=
 In[5]:= XDSolveValue[{Derivative[1][y][x] == x y[x], Derivative[1][z][x] == 5 z[x], y[0] == 3, z[0] == 5}, y[x] + z[1], x]
 Out[5]=
 In[6]:= XDSolveValue[{Derivative[1][y][x] == x y[x], Derivative[1][z][x] == 5 z[x], y[0] == 3, z[0] == 5}, \!\( \*SubsuperscriptBox[\(\[Integral]\), \(0\), \(7\)]\(\(( \*SuperscriptBox[\(y[x]\), \(2\)] + 3\ z[x])\) \[DifferentialD]x\)\), x]
 Out[6]=

 In[7]:= Xeqn = {(y^\[Prime]\[Prime])[x] == 4 Derivative[1][y][x] + 1/Derivative[1][y][x]^2, y[1] == 3, Derivative[1][y][1] == 1};
 In[8]:= Xsol = DSolveValue[eqn, y, x]
 Out[8]=

 In[9]:= Xeqn /. {y -> sol} // FullSimplify
 Out[9]=

## Mathematica

Questions? Comments? Contact a Wolfram expert »