Categories

## Laplace transform of PDE

I have the partial differential equation given by $u_{t}=u_{yy}$ with the following IVP’s: $u(x,y,0)=0, u(0,0,t)=1$ and $u_{t}(x,0,t)+u_{x}(x,0,t)=0$ $u$ is a function of three variables, $x,y,t$. My question is to know which variable do I have to use for the Laplace transform? is it always $t$ or depends on the IVP?

Categories

## how to obtain the general solution using separation of variables.

Consider the Laplace equation $$\frac{\partial ^2 u}{\partial x^2} + \frac{\partial ^2 u}{\partial y^2} = 0,\quad\quad-\infty<x<\infty,\quad 0<y<\infty$$ with the boundary conditions $$\lim_{|x|\rightarrow \infty} u(x,y)\rightarrow 0, \quad 0 < y < \infty,$$ $$\lim_{y\rightarrow \infty} u(x,y)\rightarrow 0, \quad -\infty < x < \infty,$$ $$u(x,0)=x, \quad 0 \leq x < 1,$$ $$u_y(x,0)=0, \quad 1 < x < \infty,$$ which […]

Categories

Categories

## print equally spaced elements of a 2D array with printf

I am trying to print a 2d array that has a maximum of 3 digit numbers that are aligned when printed. For example, with a simple printf, it looks like this: [0, 232, 20, 96, 176, 0, 0] [0, 0, 24, 0, 0, 176, 0] [0, 0, 0, 0, 0, 0, 0] I would like […]

Categories

## Calling round(), ceiling(), floor(), min(), max() in pandas eval

As title says, Is there a way to support round, ceiling, min, max, floor functions in pandas eval. DataFrame: import pandas as pd import numexpr as ne op_d = {‘ID’: [1, 2,3],’V’:[‘F’,’G’,’H’],’AAA’:[0,1,1],’E’:[102014,112019,122017] ,’D’:[‘2019/02/04′,’2019/02/01′,’2019/01/01′],’DD’:[‘2019-12-01′,’2016-05-31′,’2015-02-15′],’CurrentRate’:[7.5,2,2],’NoteRate’:[2,3,3],’BBB’:[0,00,4],’Q1′:[2,8,00],’Q2′:[3,5,7],’Q3′:[5,6,8]} df = pd.DataFrame(data=op_d) abs() and sqrt() function works with pandas eval. i.e. df.eval(‘TT = abs(sqrt(Q1+Q2)-Q2)’,inplace=True) df can anyone suggest how to access […]

Categories

## What is the best way for me to print out a 2d array in python

I’m fairly new to coding, so this may seem like a bit of a silly question, however I am trying to print a 2d array grid and I’m not sure how I am supposed to do it. This is my code so far: colA = [” “, ” “, ” “, ” “, ” “] […]