Solve A*(Uxx+Uyy)-B(x)*Ux=0

  • Thread starter JG
  • Start date
In summary, the problem is to solve A*(Uxx+Uyy)-B(x)*Ux=0, where Uxx means second partial derivative of U on x and U(x,y); A is a constant and B(x) is a function of x. The equation has boundary conditions dU/dx=0 at x=0 and x=L, and initial conditions U(x,0)=f(x) and U_t(x,0)=g(x) in Mathematica. The problem can be solved using separation of variables.
  • #1
JG
2
0
I must solve A*(Uxx+Uyy)-B(x)*Ux=0 , where Uxx means ssecond partial derivative of U on x and U(x,y); Ais constant and B(x) is function of x! The eq has BC dU/dz=0 and dU/dy=0 IC U(0,y)=1 for -1<y<0 and U(0,y)=1 for 0<y<1 in Mathematica!
Can anybody help me with some example? Thanks, Jan mail: jan_golob@email.si
 
Physics news on Phys.org
  • #2
JG said:
I must solve A*(Uxx+Uyy)-B(x)*Ux=0 , where Uxx means ssecond partial derivative of U on x and U(x,y); Ais constant and B(x) is function of x! The eq has BC dU/dz=0 and dU/dy=0 IC U(0,y)=1 for -1<y<0 and U(0,y)=1 for 0<y<1 in Mathematica!
Can anybody help me with some example? Thanks, Jan mail: jan_golob@email.si

Hey JG, don't know why others aren't commenting about your problem but for me it is a bit awkwardly posed. This is what I would consider well-posed:

[tex]\text{DE:}\quad Au_{xx}+Au_{yy}-B(x)u_x=0\quad 0\le x \le L[/tex]

[tex]\text{BC:}\quad u_x(0,t)=0\quad u_x(L,t)=0[/tex]

[tex]\text{IC:}\quad u(x,0)=f(x)\quad u_t(x,0)=g(x)[/tex]

Now saying that's yours but if the problem were this, then I'd use separation of variables and proceed.
 
Last edited:
  • #3


Sure, I can provide an example for solving this equation in Mathematica. First, we need to define the variables and constants:

A = 2; (*constant*)
B[x_] := x^2; (*function of x*)
U[x_, y_] := u[x, y]; (*defining U as a function of x and y*)

Next, we can use the built-in function DSolve to solve the equation:

DSolve[A*(D[U[x, y], {x, 2}] + D[U[x, y], {y, 2}]) - B[x]*D[U[x, y], x] == 0, U[x, y], {x, y}]

This will give us the general solution to the equation:

{{U[x, y] -> C[1] + C[2]*y + (A*Integrate[B[x], x] + C[3])*x + (A*Integrate[B[x], x, x] + C[4])*y^2}}

Next, we can use the boundary conditions to solve for the constants C[1], C[2], C[3], and C[4]. In this case, we have two boundary conditions at x=0 and three unknown constants, so we will need to use a numerical method to solve for the constants. For example, we can use the finite difference method:

(*creating a grid for x and y*)
xgrid = Table[i, {i, -1, 1, 0.1}];
ygrid = Table[j, {j, -1, 1, 0.1}];

(*creating a matrix for the finite difference method*)
matrix = Table[0, {i, Length[xgrid]}, {j, Length[ygrid]}];

(*filling in the matrix with the equation*)
Do[
If[i == 1, matrix[[i, j]] = D[U[xgrid[], ygrid[[j]]], y]; (*boundary condition at x=0*)
matrix[[i, j]] = 0; (*boundary condition at y=0*)
,
matrix[[i, j]] = A*(D[U[xgrid[], ygrid[[j]]], {x, 2}] + D[U[xgrid[], ygrid[[j]]], {y, 2}]) - B[xgrid[]]*D[U[xgrid[[i
 

1. What does the equation A*(Uxx+Uyy)-B(x)*Ux=0 represent?

This equation is known as the Poisson's equation and is commonly used in mathematical physics to describe the behavior of a scalar field, U, in a given space. A represents a constant, Uxx and Uyy represent the second partial derivatives of U with respect to x and y, and B(x) is a function of x.

2. What is the purpose of solving this equation?

The purpose of solving this equation is to find a function U that satisfies the given conditions. In physics, this can represent finding the distribution of a scalar field in a given space, such as electric potential or temperature.

3. What methods can be used to solve this equation?

There are several methods that can be used to solve this equation, including the method of separation of variables, the method of eigenfunction expansion, and the method of Green's functions. Each method has its own advantages and limitations, and the choice of method depends on the specific problem being solved.

4. How do boundary conditions play a role in solving this equation?

Boundary conditions are essential in solving this equation as they provide the necessary constraints for finding a unique solution. These conditions specify the behavior of the function U at the boundaries of the given space and are crucial for determining the constants and coefficients in the solution.

5. Can this equation be applied to real-world problems?

Yes, this equation has many applications in various fields of science and engineering, including electromagnetism, heat transfer, fluid dynamics, and quantum mechanics. It is used to solve problems involving the behavior of scalar fields in different types of physical systems.

Similar threads

  • Differential Equations
Replies
12
Views
3K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
27
Views
2K
Replies
2
Views
1K
Replies
2
Views
1K
  • Topology and Analysis
Replies
3
Views
2K
  • Differential Equations
Replies
1
Views
2K
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Differential Equations
Replies
3
Views
1K
Back
Top