Ask Your Question

Marios Papachristou's profile - activity

2020-12-06 09:59:52 +0200 received badge  Notable Question (source)
2020-01-27 20:34:00 +0200 received badge  Popular Question (source)
2018-06-03 20:19:35 +0200 received badge  Notable Question (source)
2017-12-14 16:20:18 +0200 received badge  Popular Question (source)
2016-11-28 12:51:02 +0200 received badge  Famous Question (source)
2016-03-23 07:42:09 +0200 received badge  Notable Question (source)
2016-03-23 07:42:09 +0200 received badge  Popular Question (source)
2015-02-03 20:20:02 +0200 commented question Solving PDEs

Thank you very much! I would like to wonder if there is extensive documentation on PDEs with sage (even with hundreds of lines of code). I am particularly interested in solving time dependent Schroedinger Equations that in one dimension (for example) have the form $$\hat H \psi = i\hbar \dot \psi$$ meaning that the wavefunction depends on x (space) and t (time). However in simpler forms (where for example the potential energy is 0) then the solution can be expressed as a product of two functions (like in the heat equation) as $\psi = \psi (x,t) = X(x)T(t)$

UPDATE: This method works pretty for such equations well since the equations reduce to $\hat H X = EX$ and $\dot T = E/(i \hbar ) T$ and the algorithm is very simple.

2015-02-03 20:04:47 +0200 received badge  Scholar (source)
2015-02-03 20:04:45 +0200 received badge  Supporter (source)
2015-02-02 17:36:18 +0200 asked a question Solving PDEs

Hello can I solve equations of the following form in sage?

E.g. $$A\frac{\partial ^ n f}{\partial x^n} + B \frac{\partial^kf}{\partial y^k} = 0, \quad f=f(x,y) $$

Meaning a PDE that contains the n-th derivative with respect to x and the k-th derivative with respect to y.

2015-01-02 06:14:06 +0200 received badge  Student (source)
2015-01-01 21:26:59 +0200 asked a question Defining constants after solving ODE/PDE

Hello

Solving the differential equation $f'(x) = f(x)$ the answer leads to $f(x) = ce^x$ where $c$ is a constant. How can I generically solve this ODE in SAGE and define $c$ afterwards (I don't want to use ics)?

Consider this script

x = var('x')
f = function('f',x)
f = desolve(diff(f,x) == f(x), f, ival=x)
print str(f(x))
>> ce^x
#I want to define c afterwards

A method I found:

#continue the previous prompt
f(x,c) = f(x)
h(x) = f(x,10)

Is there something else that I can do?

2015-01-01 21:16:51 +0200 commented answer Defining differential operator that acts like curl
  1. However $\nabla \cdot \vec F$ work in n-dimensions since it's a dot product
  2. I do not want to just calculate the derivative but I want the differential operator to act as a multiplier

For example the hamiltonian operator $\hat H = \frac {\hbar}{-2m} \nabla^2 + V $ can act on a wavefunction $\psi$ as $$\hat H | \psi \rangle = - \frac{\hbar}{2m} \nabla^2 \psi + V \psi$$

2014-12-30 15:19:04 +0200 received badge  Editor (source)
2014-12-30 14:45:21 +0200 asked a question Defining differential operator that acts like curl

Hello,

As a newbie in using SAGE (experience with Python and Numpy), I was wondering how to define a differential operator that acts like curl (or $\nabla \times \vec F$). The curl for a vector field $\vec F=(F_x,F_y, F_z)$is defined as a determinant $\mathrm{det} (\nabla,\vec F) $. I want to define such operators that act on $F_x, F_y, F_z$ without calculating the determinant a priori. In other words if I was to multiply $\frac {\partial }{\partial x}$ with $F_y$, I would expect to get $\frac{\partial F_y}{\partial x}$ EDIT:

class DiffOpp(SageObject):

    def __init__(self, dep_var):
        self.dep_var = dep_var

    def __mul__(self, f):
        return diff(f, self.dep_var)