How can i solve P(x,y) with 2 equations of diff

2 ビュー (過去 30 日間)
esat gulhan
esat gulhan 2020 年 9 月 12 日
コメント済み: esat gulhan 2020 年 9 月 12 日
Hi guys, .
My problem is to find P(x,y), how can i find P(x,y) with this equations. I can accept with analtical as well as numerical solutions. I know dP/dx, and dP/dy but i dont know how to solve P(x,y). My code is below
clc; clear;
syms a b p x y u v c P
u=a*x+b;
v=-a*y+c*x;
eq1=diff(P,x)==-p*(u*diff(u,x)+v*diff(u,y))
eq2=diff(P,y)==-p*(u*diff(v,x)+v*diff(v,y))

採用された回答

BOB MATHEW SYJI
BOB MATHEW SYJI 2020 年 9 月 12 日
If initial conditions are given, then this code might help.
clc; clear;
syms a b p x y u v c P t1 t2
u=(a*x)+b;
v=(-a*y)+(c*x);
s1=-p*(u*diff(u,x)+v*diff(u,y));
s2=-p*(u*diff(v,x)+v*diff(v,y));
s3(x)=int(s1,x)+t1;
% s3 and s4 are P(x,y) itself. t1 and t2 represents
% constants containing variables y and x respectively after integration
% t1 can be solved by applying the initial conditions to s3(x)
% t1=s3(x)-int(s1,x); for given x value and corresponding value of P(x,y)
s4(y)=int(s2,y)+t2;
% t2 can be solved by applying the initial conditions to s4(x)
% t2=s4(y)-int(s2,y); for given y value and corresponding value of P(x,y)
P(x,y)=(s3(x)+s4(y))/2
  1 件のコメント
esat gulhan
esat gulhan 2020 年 9 月 12 日
Hey thanks,
That solution is very easy and clear, how can not i think to integrate them, my was with dsolve but it does not give exact solution. It is worth to accept.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by