I want help solving differential equations

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;

 Akzeptierte Antwort

Rik
Rik am 1 Dez. 2022

0 Stimmen

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 Kommentare

kubel
kubel am 1 Dez. 2022
Thank you very much, but indexing errors and
Untitled error occurs Which part should I modify?
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 = 

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2022a

Gefragt:

am 1 Dez. 2022

Kommentiert:

Rik
am 1 Dez. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by