Hello, Im calculating following third term function. I got the following answer without Matlab . However when solving the function with dsolve Matlab gives me this answer .
So my question is, where is this -1/2187 coming from? Is it possible to get rid of it somehow when using dsolve?

 채택된 답변

Matt J
Matt J 2023년 11월 16일
편집: Matt J 2023년 11월 16일

1 개 추천

syms y(x)
eqn = diff(y,x,3)+81*diff(y,x) == 3*x+8;
ytemp(x) = dsolve(eqn);
ysol(x)=dsolve(diff(y,x)==diff(ytemp,x))
ysol(x) = 

댓글 수: 2

Arto Jyvälä
Arto Jyvälä 2023년 11월 16일
Yes I know you can get rid of it this way. Do you know where the number comes from or can I use some command to remove it?
Matt J
Matt J 2023년 11월 16일
편집: Matt J 2023년 11월 16일
Do you know where the number comes from
No, not exactly. I speculate dsolve converts this into a 4th order equation and then differentiates the solution to obtain y(x). If the linear terms are not collected together before the final differentiation step, a second constant results.
or can I use some command to remove it?
Yes, you can use the commands in my answer.

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

추가 답변 (1개)

John D'Errico
John D'Errico 2023년 11월 16일

3 개 추천

Why do you care?
Note that C1 is completely arbirtrary! C1 is an unknown constant!
So you can trivially add or subtract any constant from the result, and the solution is still as valid.
Once you apply initial conditions, then the constant will be absorbed. It will magically go away.

댓글 수: 1

Arto Jyvälä
Arto Jyvälä 2023년 11월 16일
I have school assignment and I need to check the answer with Matlab. Yes you are right that it goes away if i apply conditions. I was just wondering is it possible to get rid of it somehow.

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

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

릴리스

R2023a

태그

질문:

2023년 11월 16일

편집:

2023년 11월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by