How can i get output?

1 次查看(过去 30 天)
세빈 김
세빈 김 2022-4-15
>> syms y(x)
ode=diff(y,x)==x-1/y
ode(x) =
diff(y(x), x) == x - 1/y(x)
>> ySol(x)=dsolve(ode)
경고: 기호 해를 구할 수 없습니다.
> dsolve (209번 라인)번 라인에서
ySol(x) =
[ empty sym ]
how can i get the answer of "ySol(x)="?

回答(1 个)

sai charan sampara
sai charan sampara 2023-9-27
Hello,
I understand that you are trying to solve a differential equation using “dsolve” but you are getting an empty sym.
This is because the system you have provided has no solution. If you are expecting a solution, then maybe your equation missed a bracket and is (instead of x-1/y) as follows:
eqn=diff(y,x)==(x-1)/y;
This equation has solutions, and they are:
ySol(x) =
(x^2 - 2*x + C1)^(1/2)
-(x^2 - 2*x + C1)^(1/2)
You can refer to the below documentation to learn more about “dsolve”:
Thanks,
Charan

类别

Help CenterFile Exchange 中查找有关 방정식 풀이 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!