I have tried software like Wolfram Mathematica to find Fourier transform of this function
1/(1 - Exp [I x])
But Mathematica can not find Fourier transform of this function, I want to know that is there any mathematical method for finding Fourier transform of this function.
Related
I want to inverse fourier transform of Dirac Delta function, δ(t).
So i do these:
>> syms F w t
>> F(w)=dirac(w)
F(w) = (symfun) DiracDelta(w)
>> ifourier(F(w))
ans = (sym)
1
----
2*pi
Although the right result should be like this:
Any explanation why does it compute wrong?
There are different conventions for the fourier transform This page describes some of the common ones, see also wikipedia
The convention octave is using for the Fourier transform is the standard one. In this convention the fourier transform has no constant factor in front of the integral, so requires a factor of 1 / 2π in front of the inverse (so that F ⚬ f = Id).
There are several reasons to prefer the convention you are using where the standard definition is multiplied by a constant of 1 / √2π. It's more symmetric because the inverse will have the same constant factor out the front. It also "normalizes" the fourier transform which is useful in certain contexts. But it's not the convention octave is using.
For matrix form of bellman equation there is a direct solution. But I dont understand why the computational complexity for this form is n^3. I will be very appreciated if anyone can explain. thx
The Bellman equation of the value function in vector form can be written as
V = R + γPV
Where
V is a column vector representing the value function for each state (1..n)
R is a column vector representing the immediate reward after exiting a particular state
γ (gamma) is the discount factor
P is an nxn transition matrix (All the places we may end up)
Because the Bellman equation is a linear equation we can solve it directly. We can solve for V by rearranging the equation like this.
V - γPV = R
(I - γP) V = R
V = R (I - γP)^-1
Basically, due to the fact that you need to perform matrix inversion to solve for V, which is O(n^3) complexity using the standard Gauss-Jordan algorithm
I have two equations:
(x-6)^2 + (y-2)^2 = 6^2
(x-2)^2 + (y-2)^2 = 3^2
I subtracted the 2nd equation from the 1st and got the answer. However, I want to find x and y from the set of equations using any programming language. Can anybody help to get the source code for this?
If you want to solve mathematical equations symbolically like this, there are many programming languages and softwares available:
Julia (free)
Sympy (python library - free)
Wolfram Mathematica (paid)
Maple (paid)
(Wolfram Alpha which is just a solver online. (freemium))
Here are some "source code" as you requested:
sympy:
import sympy as sp
x=sp.Symbol('x')
y=sp.Symbol('y')
print(sp.solve([(x-6)**2+(y-2)**2-6**2, (x-2)**2+(y-2)**2-3**2], [x, y]))
Mathematica:
FullSimplify[Solve[{(x - 6)^2 + (y - 2)^2 == 6^2, (x - 2)^2 + (y - 2)^2 == 3^2}, {x, y}]]
Mathematica also has it's own SE site here
Just for the sake of examples: here is a wolfram alpha link
can anyone tell me how can I convert this cos-1 to TCL, due to in TCL
just work with normal cos, not like this cos-1, also it calls "The inverse cosine".
If you want the reverse cosine in degree, you could use this:
expr {acos($x)*180/acos(-1)}
acos(-1) is pi.
Tcl has always called the inverse cosine function acos; it's part of expressions:
% expr { acos(0.123) }
1.4474840516030245
Result is in radians, of course.
I've been trying to display in my console an exponential equation like the following one:
y(t) = a*e^t + b*e^t + c*e^t
I would write it as a string, however the coefficients a,b and c, are numbers in a vector V = [a b c]. So I was trying to concatenate the numbers with strings "e^t", but I failed to do it. I know scilab displays polynomial equations, but I don't know it is possible to display exponential one. Anyone can help?
Usually this kind of thing is done with mprintf command, which places given numerical arguments into a string with formatting instructions.
V = [3 5 -7]
mprintf("y(t) = %f*e^t + %f*e^t + %f*e^t", V)
The output is
y(t) = 3.000000*e^t + 5.000000*e^t + -7.000000*e^t
which isn't ideal, and can be improved in some ways by tweaking the formatters, but is readable regardless.
Notice we don't have to list every entry V(1), V(2), ... individually; the vector V gets "unpacked" automatically.
If you wanted to have 2D output like what we get for polynomials,
then no, this kind of thing is what Scilab does for polynomials and rational functions only, not for general expressions.
There is also prettyprint but its output is LaTeX syntax, like $1+s+s^{2}-s^{123}$. It works for a few things: polynomials, rational functions, matrices... but again, Scilab is not meant for symbolic manipulations, and does not really support symbolic expressions.