필터 지우기
필터 지우기

I want help solving differential equations

조회 수: 2 (최근 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 CenterFile Exchange에서 Numeric Solvers에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by