Hello,
I'm trying to solve the following differential equation:
dx2/dt = (-x2/0.19) + (x3/12)
Both x2 and x3 are functions of time t.
My code is the following one:
syms x2(t)
syms x3(t)
vgl = (diff(x2, t) == -(x2(t)/0.19) + (x3(t)/12));
bvw = (x2(0) == 0);
Sopl(t) = dsolve(vgl, bvw)
I get the following error: Attempt to execute SCRIPT dsolve as a function: C:\Users\Gebruiker\Desktop\dsolve.m
Error in qsfdqsf (line 5) Sopl(t) = dsolve(vgl, bvw)
What do I do wrong?

 채택된 답변

Birdman
Birdman 2017년 12월 22일

0 개 추천

Probably you have a script named dsolve.m in your current directory and it is shadowing the function dsolve. Change the name of that script.

댓글 수: 3

Sam
Sam 2017년 12월 22일
편집: Walter Roberson 2017년 12월 22일
I get the following solution:
Sopl(t) =
exp(-(100*t)/19)*int((exp((100*x)/19)*x3(x))/12, x, 0, t, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)
What does that mean? the ignore speciale cases and stuff?
Birdman
Birdman 2017년 12월 22일
By those two properties, dsolve does not apply simplifications to produce simpler solutions therefore the results you have are more complete.
Karan Gill
Karan Gill 2017년 12월 22일
The result is expected because you solved one ODE for 2 unknown functions. So you got an expression for one unknown in terms of the other unknown.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

태그

질문:

Sam
2017년 12월 22일

편집:

2017년 12월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by