Items tagged with derivative derivative Tagged Items Feed

Hi,
I'm new at maple and have a problem/question with the rkf45 numerical ODE Solver.

At first, my computer need a lot of time to calculate an analytic solution.
Therefor, I use the numerical way.

I have the following second order ODE:
ODE:=m*((D@@2)(x))(t)+d*(D(x))(t)+k*x(t) = d*(eval(diff(y(x), x), x = t))+k*y(t)
where y(t) is a realy big piecewise function, defined by me.

My initial conditions are:
x(0) = 0, (D(x))(0) = 0

With dsolve, I get the solution x(t) and the first derivative x'(t). I'm able to plot them with odeplot.

But...

Problem 1:
I need also the second derivative x''(t).
On this page: http://www.maplesoft.com/support/help/maple/view.aspx?path=dsolve%2Frkf45there is an example (eq 13 and 14) where the second derivative is useable, but this doesn't work with my differential equation.
I have add 
(D(D(x)))(0) = 0
to my initial conditions but then, I got the error that only 2 initial conditions are required.
What could I do, so that rkf45 returns also the second derivative?

Problem 2:
And in addition to this, I want to calculate with x(t), x'(t), x''(t) but I found no way to use them.
Only plots are possible.
If I reduce y(t) to a minimum, I can do everything with the analytic solution: plot, d/dt, d2/dt2, +, -, ...
I tried also to convert the procedure to a function but in this case, there is no way to derivate it.

Many thanks...

Hi!

This question is related to http://www.mapleprimes.com/questions/204419-Derivatives-Of-Splines-Are-Not-Defined and http://www.mapleprimes.com/questions/42114-Problem-With-Spline-Integrating , however I have not been able to apply the solutions given there to my problem.

I have a set of points given by

and certain function value points given by

where e1 is the function I am approximating.


Using

I come up with my piecewise function.

When I do diff(e4,x), however, the points at the nodes show "float(undefined) x=0.2..."(the node).

As it turns out, the value of the derivative on the left of the node is not equal to that of the right side by a factor of 10^(-7), in other words, numerically unimportant but high enough for maple to realise it is not the same number. How could I tell Maple that I am happy choosing, for example, the value given by the function on right side of the node?

I welcome any suggestions.

Many thanks in advance.

Hello,

i am trying to get a latex output which equals the displayed maple equations, where i am using alias/surpress or declare to shorten the dependencies of my derivatives. Whereas in Maple this looks how i want it to look like, i can not get the latex() command to apply the aliases. Instead it replaces the short forms with the long terms before creating the latex code. Is there anyway to get a latex output directly from the displayed math WITH alias?

2 small examples:

 

 

 

Both yield  $ X \left( a,b,c \right)$ whereas i would like to get X. Simply substituing changes the partial differential symbol to "d" in the latex output and makes the equations unuseable, so this is no option i guess..

Thanks a lot for any suggestions!

Dear I want to define a general operator D for Fractional derivative whose behave like this

 

(D^alpha)(t^beta) = GAMMA(1+beta)*t^(beta-alpha)/GAMMA(1+beta-alpha)

Is it possible to somehow extract a derivative from numeric solution of partial differential equation?

I know there is a command that does it for dsolve but i couldn't find the same thing for pdsolve.

The actual problem i have is that i have to take a numeric solution, calculate a derivative from it and later use it somewhere else, but the solution that i have is just a set of numbers an array of some sort and i can't really do that because obviously i will get a zero each time.

Perhaps there is a way to interpolate this numeric solution somehow?

I found that someone asked a similar question earlier but i couldn't find an answer for it.

Hello everyone, 

I have a question regarding my Spline interpolations. I am not an expert on the theory there, but the maple help tells me that the first derivative of an 3rd degree spline interpolation should exist at the knots. But a derivation returns "undefined" at some of the knots instead. Here is my example:

x(t):=Spline([[0, 0], [1, 1], [2, 2], [3, 2.2], [4, 1.8]],t,degree=3);

returns

x(t):=piecewise(t < 1, .953571428571429*t+0.464285714285714e-1*t^3, t < 2, -0.9286e-1+1.09285714285714*t+.139285714285714*(t-1)^2-.232142857142857*(t-1)^3, t < 3, .65000+.675000000000000*t-.557142857142857*(t-2)^2+0.821428571428571e-1*(t-2)^3, 2.77857-.192857142857143*t-.310714285714286*(t-3)^2+.103571428571429*(t-3)^3);

 

diff(x(t),t);

returns

piecewise(t < 1., .953571+.139286*t^2, t = 1., Float(undefined), t < 2., .814286+.278571*t-.696429*(t-1.)^2, t = 2., Float(undefined), t <= 3., 2.90357-1.11429*t+.246429*(t-2.)^2, 3. < t, 1.67143-.621429*t+.310714*(t-3.)^2);

 

Not defined at t=1 and t=2. Is it possible to get an interpolation of which the first derivative exists at every point? Thank you very much!

I wish to evaluate the expression

knowing that

where a is a constant.  It is not hard to see, assuming enough differentiability,  that the expression evaluates to

I know how to do this when all the derivatives are expressed in terms of the diff() operator.  Here it is:

eq := diff(u(x,t),t) = a^2*diff(u(x,t),x,x);
expr := diff(u(x,t),t,t);
eval['recurse'](expr,[eq]);

However, I would prefer to do the computations when all derivatives are expressed in terms of the D operator but cannot get that to work.  What is the trick?

I googled everywhere for this and most results just tell me what diff and D does...

 

Basically I have a function, let's say

 

f:= x -> x^2

How do I turn the derivative of f into a function?

 

I tried

 

fprime := x -> diff(x^2,x)

 

But tihs just shows me diff(x^2,x), instead of x -> 2x

guys , i have a metric and i want to define a componenets of a tensor and then obtain its covariant derivative with respect to a metric, what is your idea ?

N_1=-A(r)^1/2 , A_2=A_3=A_4=0 , what is D_[nu] N_1 =?

 in general i want to define N[1]=-A(r)^(1/2) and N[2] = N[3]= N[3] = N[4] = 0 And define F[mu, nu] = 2*(D_[mu] N[nu]-D_[nu] N[mu]) And define Omega[mu, nu] = 2*(D_[mu] N[nu]+D_[nu] N[mu]) and compute expression F_[alpha, beta] F_[~alpha`, ~beta ] And N_[alpha] N_[~beta`] F_[ ~alpha, ~lambda ] Omega_[beta, lambda])

i have problem with this how to difine this tensorial terms and how to compute them.

Covariant.mw

 

thxxxx

How to find the nth derivative of (logx)/x  and (e^x)logx by using leibenitz theorem....?

 

 

 

 

When I take the derivative of this function wrt p, I am getting this:

 

Why the program gives , instead of only

Sorry for the format, I just copy and paste.

Thanks,

 

 

 

related topic is here

Suppose I have 2 differential equations in vector form, and I want to solve them using dsolve. I am not able to figure the syntax for what I would do for scalar ODE to initial its derivative at t=0, which is D(x)(0)=some_value, but do the same when x is a vector.

Here is an example:

restart;
x := t-> <x1(t),x2(t)>;
eq:=diff~(x(t),t$2) =~ <sin(t),t>;
ic1:=x(0)=~0;

So far so good. Now I wanted to also make initial conditions for derivative at zero to be some value. Only syntax I know is using D(x)(0)=some_value. But this works for scalar ODE. When I tried

ic2:=D(x)(0)=~0;

I got

This does not work:

ic2:=diff~(x)(0)=~0;

any help on the correct syntax to use? I am using Maple 2015

 

Hi, 


     I've been playing around with the Physics package, and I'm confused on evaluaing derivatives of explicit funcitons of the coordinates. This code below doesnt behave as I would think. I'm trying to define z as a function of X[mu]*X[mu], and take diff(z, X[mu]). You can see that each method d_, diff,  disagree and none are satisfactory ansers. (Maple 2015, Windows 8.1 64-bit, Intel i5 Haswell) 

# Declare coordinates for 2 dimensions, flat space

restart:
with(Physics):
Setup(mathematicalnotation = true, dimension = 2):
Coordinates(X):

# Method 1: Using Define and various differential operators
Define(z):
z :=sqrt(R^2-X[mu]*X[mu]);
d_[mu](z(X));
d_[1](z(X));
diff(z, x1);  #This one is correct
diff(z, X[mu]); # off by 2

# Method #2: Using functions
# Off by a factor of 2
z2 := mu -> sqrt(R^2-X[mu]*X[mu]);
diff(z2(mu), X[mu]); # off by 2

 PhysicsDiffBug.mw

In the following, the diff operator calcuates the derivative correctly, but the D operator doesn't.  A bug?

restart;

f := x -> a[1][2]*x;    # the double index on a[][] is intended

proc (x) options operator, arrow; a[1][2]*x end proc

 

diff(f(x), x);

a[1][2]

 

D(f)(x);

(D(f))(x)

 


Here is a worksheet containing the commands above in case you want to try it yourself: mw.mw

Hello everyone!

I'm pretty new with Maple. I think I've understood the way Maple handles differentiation fairly well, but upon a specific request from my PhD tutor I have to perform a task which is giving me a hard time. 

My question is: is in any way possible to express a derivative of a function or expression in terms of the function itself?
I'll try to explain myself with an example: let f(x) and f'(x) be the function and its first derivative:

Instead of expressing f'(x) in the way shown, I'd like to express it as a function of f(x), such as in the following:

I would apply the same process to the higher order derivatives, if possible.

A huge thank you to whoever will help me!

1 2 3 4 5 6 7 Last Page 1 of 23