フィルターのクリア

issue with solving system of odes in matlab

2 ビュー (過去 30 日間)
Wajahat
Wajahat 2017 年 10 月 5 日
コメント済み: Walter Roberson 2018 年 1 月 24 日
syms l g t A omg k
syms f1(x) f2(x)
S = dsolve(diff(f1) == l*f1 + sqrt(g)*A*exp(i*omg*t-i*k*x)*f2, diff(f2) == -sqrt(g)*A*exp(-i*omg*t+i*k*x)*f1 -l*f2)
S.f1
S.f2
matlab shows error when i solve the above mentioned ode in matlab, is there anyone who can guide me to remove the error.

採用された回答

Walter Roberson
Walter Roberson 2017 年 10 月 5 日
編集済み: Walter Roberson 2018 年 1 月 24 日
MATLAB is not powerful enough to solve that analytically. Maple says that the solution is
f1(x) = -(1/2)*exp(1i*omg*t)*(C2*(1i*k-(-k^2-4*A^2*g+(4i)*k*l+4*l^2)^(1/2)+2*l)*exp((1/2)*(1i*k-(-k^2-4*A^2*g+(4i)*k*l+4*l^2)^(1/2))*x)+C1*exp((1/2)*(1i*k+(-k^2-4*A^2*g+(4i)*k*l+4*l^2)^(1/2))*x)*(1i*k+(-k^2-4*A^2*g+(4i)*k*l+4*l^2)^(1/2)+2*l))/(g^(1/2)*exp(i*k*x)*A)
f2(x) = C1*exp((1/2)*(1i*k+(-k^2-4*A^2*g+(4*1i)*k*l+4*l^2)^(1/2))*x)+C2*exp((1/2)*(1i*k-(-k^2-4*A^2*g+(4*1i)*k*l+4*l^2)^(1/2))*x)
Here, C1 and C2 are arbitrary constants of integration that depend upon the boundary conditions.
  2 件のコメント
Wajahat
Wajahat 2018 年 1 月 23 日
@Roberson, can you provide me the code of the above solution
Walter Roberson
Walter Roberson 2018 年 1 月 24 日
simplify( dsolve([diff(f1(x), x) = l*f1(x)+A*g^(1/2)*exp(-I*k*x+I*omg*t)*f2(x), diff(f2(x), x) = -l*f2(x)-A*g^(1/2)*exp(I*k*x-I*omg*t)*f1(x)]), size)
This is Maple code, not MATLAB code.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by