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

2 visualizaciones (últimos 30 días)
esat gulhan
esat gulhan el 12 de Sept. de 2020
Comentada: esat gulhan el 12 de Sept. de 2020
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))

Respuesta aceptada

BOB MATHEW SYJI
BOB MATHEW SYJI el 12 de Sept. de 2020
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 comentario
esat gulhan
esat gulhan el 12 de Sept. de 2020
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by