ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 19 Feb 2020 13:38:32 -0600continuous Fourier transformhttps://ask.sagemath.org/question/49995/continuous-fourier-transform/ I have some basic code to plot a "nice" real-valued function and its continuous Fourier transform. For example,
F(x) = e^(-x^2)*(1-x^2)
plot2 = F.plot(xmin = -5, xmax = 5, color = 'red')
### continuous Fourier transform on RR
var('xi')
fhat(xi) = integral((F(x)*exp(-2*pi*I*x*xi)),(x,-oo,oo))
plot1 = fhat(xi).real().plot(xmin = -5, xmax = 5) #put fhat and f in the same plot
show(plot1 + plot2, xmin = -5, xmax = 5, ymin = -1, ymax = 2)
![f and fourier transform](/upfiles/15821404768803796.png)
Like many things in Sage, I appreciate it when the code looks like the formal math. However, this code is not robust. For instance, if we change the function to
F(x) = e^(-x^2)*sin(x)/x
Then I get an error message "Variable 'xi' not found". I'd like to improve this code to work with a wider class of functions.
Thanks, Daniel LWed, 19 Feb 2020 13:38:32 -0600https://ask.sagemath.org/question/49995/Show correct output of polynomialhttps://ask.sagemath.org/question/43792/show-correct-output-of-polynomial/ Hi, I am new to sage and I am trying to construct a polynomial to try to transform it. However, when writing it I am getting an incorrect output.
x=var("x")
s = (x^2+2*x+1) + 1/(x^2+2*x+1)
s.show()
And this is the output I am getting -
x^2+2x + 1/x^2+2x+1 +1 (I am unsure why the 1 is carrying over all the way to right side)
I am looking to obtain the following output to begin transforming it -
x^2+2x+1 + 1/x^2+2x+1
Appreciate any help!nevar123Sat, 29 Sep 2018 14:15:10 -0500https://ask.sagemath.org/question/43792/How to find inverse laplace transformhttps://ask.sagemath.org/question/36656/how-to-find-inverse-laplace-transform/Hi!
I'm trying to find the inverse laplace transform from the following equation:
(5 * s * e^(-2*s))/(s^2 + 9).inverse_laplace(s,t),
although sage responds with:
ilt((5 * s * e^(-2*s))/(s^2 + 9)).
How do I find the inverse laplace transform from the equation above?
Sincerly SimonismonSat, 18 Feb 2017 13:13:43 -0600https://ask.sagemath.org/question/36656/Setting the conditions at t=0 for laplace transform with sage (instead of maxima)https://ask.sagemath.org/question/31713/setting-the-conditions-at-t0-for-laplace-transform-with-sage-instead-of-maxima/Hallo,
I am trying to calculate the laplace transform for the following differential equation with sage instead of maxima.
"m*'diff(x_f(t)+x_d(t),t,2)+d*'diff(x_d(t),t,1)+c*x_d(t)+Fext(t)=0"
But I do not find how to set the values in sage at t=0 for the functions x_d(t) and x_f(t). Before I did set it with maxima with
```
maxima.eval("atvalue(x_d(t), t=0, 0)$ atvalue('diff(x_d(t),t), t=0, 0)$");
maxima.eval("atvalue(x_f(t), t=0, 0)$ atvalue('diff(x_f(t),t), t=0, 0)$");
```
Basically, I am trying to use the sage laplace transfrom function instead of the sage-maxima function resulting in a nicer notebook without all the maxima.eval add maxima.-commands. I know that sage is using maxima for the transformation in the background.
BR Howil
howilSun, 20 Dec 2015 09:56:36 -0600https://ask.sagemath.org/question/31713/z-transform and inverse z-transform in SageMathhttps://ask.sagemath.org/question/10735/z-transform-and-inverse-z-transform-in-sagemath/I would like to know if there is a way to solve z-transforms and inverse z-transforms in SageMath. In MATLAB, one can use the functions ztrans and iztrans http://www.mathworks.com/help/symbolic/ztrans.html
Thanks.AdanOvaThu, 14 Nov 2013 10:37:53 -0600https://ask.sagemath.org/question/10735/convert expression to functionhttps://ask.sagemath.org/question/8985/convert-expression-to-function/Hola,
is there a way to convert symbolic expression to proper functions?
E. g. `s = sin(x)` into `x |--> sin(x)`
So far I've been using f(x) = s(x), however, deprection warnings occur:
`DeprecationWarning: Substitution using function-call syntax and unnamed
arguments is deprecated and will be removed from a future release of Sage; you
can use named arguments instead, like EXPR(x=..., y=...)`MathemageSat, 19 May 2012 23:52:44 -0500https://ask.sagemath.org/question/8985/Continuous wavelet transform (CWT)https://ask.sagemath.org/question/8178/continuous-wavelet-transform-cwt/Hello!
Please tell me if there is a way to build a [CWT](http://en.wikipedia.org/wiki/Continuous_wavelet_transform) (or to be more precise, a CWT analog for a discrete signal) of a signal in Sage.
The task is to obtain a time evolution of the spectrum (more or less) for the recorded signal in the form of time series.
I've found the good examples of what I mean [here](http://www.mathworks.com/products/wavelet/demos.html?file=/products/demos/shipping/wavelet/cwtdwtdemo.html).
Thanks.v_2eTue, 21 Jun 2011 10:57:03 -0500https://ask.sagemath.org/question/8178/