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

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by