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 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