I want help solving differential equations

3 ビュー (過去 30 日間)
kubel
kubel 2022 年 12 月 1 日
コメント済み: Rik 2022 年 12 月 1 日
This question
my sol
syms x y(t);
eqn = exp^x(diff(y,t)+1==1);x(0)=1;
sol = dsolve(eqn);
problem
Error occurred during use: exp
Insufficient input arguments.
Error Occurred: Untitled (Line 2)
eqn = exp^x(diff(y,t)+1==1);x(0)=1;

採用された回答

Rik
Rik 2022 年 12 月 1 日
Exp is a function, not a number. There is also no implicit multiplication.
My (untested) suggestion would be this:
syms x(t);
eqn = exp(x).*(diff(x,t)+1)==1;x(0)=1;
sol = dsolve(eqn);
Some bits and pieces may still need adjusting.
  2 件のコメント
kubel
kubel 2022 年 12 月 1 日
Thank you very much, but indexing errors and
Untitled error occurs Which part should I modify?
Rik
Rik 2022 年 12 月 1 日
You can set the assumption as the second parameter in dsolve, as the documentation explains:
syms x(t);
eqn = exp(x).*(diff(x,t)+1)==1;
sol = dsolve(eqn,x(0)==1)
sol = 

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by