i am new in Mathematica and want to solve an Equation like this:
dx/dt+a*x=b
I know that there ist the function “Solve”, but I tried this “Solve[dx/dt+a*x=b, x]” and nothing happens. Not even an error was shown. So i do not know how to describe the term dx/dt.
For more infos: x(t) is a time sequence with 150 datas. Like X=[3,4,0,2,3,1,…].
In Wolfram Alpha I could just solve this equation. The Result was: x(t) = b/a+c_1 e^(-a t).
Is it right that i “just” need to define dx/dt as x’? Even if I don’t have a “normal” function which i can define?
Thank you for your answer. Sorry, that i reply that late.
Now, I was working and trying the new command DSolve and I think,now I understand it. So i was trying something new. I have to solve this monster: x_1’'[t]+gx_1’[t]+ax_1=sum_(i=2)^N b_i*x_i,x).
x_i[t] are different time series. For example x_1=[1,2,3,4,…,n], x_2=[4,6,3,5,6,…,n] and so on. I have N time series and at the left side of the equation there is only time series x_1. On the other side i want to have something like that: b_2x_2+b_3x_3+… and so on. So the equation have the character as described in the top.
I tried it in Mathematica: Input: DSolve[{a x[t] + g x’[t] + x’'[t] == Sum_ (i = 0)^infinity b_i*x_i}, x[t], t] but the program replied with
“The function x appears with no arguments.
Outpu: DSolve[{a x[t] + g Derivative[1][x][t] + (x^[Prime][Prime])[t] == 0^infinity (b : Blank[0]) Sum_ (x : Blank[0])}, x[t], t]”
So i think that something went wrong with the sum. How can I solve this problem?
Thank you for your reply. In the second Output, i do not understand waht the K[1], K[2] stands for. Furthermore I do not know what F[K[1]] stands for. What should i interpret? I have F[t]=\sum_{i=2}^\infty b_i x_i[t] . What is F[K[1]]?
I have a discrete t. The x_i[t] are time series like x_1=[3,6,8,9,…,n], x_2=[6,9,10,12,…,n] etc. for an example.
Ich würde dort also die Summe erneut einsetzen und anstatt [t] dann [K[1]], oder? Meinst du das damit? Das heißt, um das explizit lösen zu können, muss ich dann ebenfalls das Integral berechnen, nicht wahr?
Puh, ich habe mir das irgendwie schöner vogestellt.
But then remains the question what do you mean by xi[ t ]? They seem to be discrete values, which are to be represented by a function F[ t ].
I understand it like this: to each t ( the specific t valid for xi ) you go to calculate
A[t] = Sum[ x[i, t], {i, 2, n}]
and you will get a set of A - values (for the given t’s) representing the value of F for that t. And now you construct an Interpolation - Function (see Interpolation in the help-menu) which you could pass to the solution of your DGL.
But I am afraid the Integration in this case will only work numerically.
as I said, the xi[t] are time series like x1=[2,3,4,…] etc. The time series contain the data of mortality in traffic for example.
At the right side of my equation, there should be a vector like A[t]=Sum[x[i,t]b[i],{i,2,n}]=b2x2+b3x3+…+bnxn=5*[2,3,4,5,…]+2*[3,4,5,6,…]+…=[238,456,234,…] i think (as an example).
I think that you wil be right with the numerically integration.