Items tagged with diff

Feed

Not sure if this is documented explicitly to Maple users, but normally (prior to Maple 2017) interface(typesetting=extended) was all that was required to output display diff(y(x),x) as y'(x)

With Maple 2017 typesetting=extended is default and one must use with(Typesetting)  Settings(typesetprime=true) in order to output the display of diff(y(x),x) as y'(x).

Perhaps this is well documented somewhere, however I was unable to find the change. 

I know the latex() command in Maple have many issues and I have no hope of what I will ask having a solution, but thought to ask any way.

Is there a way to make maple generate the latex for all the derivatives to use ' instead of d/dx ?

for example, given this
 

ode:=diff(y(x),x)=x;
latex(ode,output=string);

The Latex generated (which is correct) is

{\frac {\rm d}{{\rm d}x}}y \left( x \right) =x

but sometines I find it more readable if the latex was

y'(x)=x

which is more common in textbooks and other places. The problem also is that I am using worksheet so can't use  y'(x) as input.

But even switching to document mode, and writing it 2D math as input, the Latex output still does not match the input

So if there is a solution to this, would it require changing the latex() command itself? or can it be done at user level?

I'd like all orders of derivatives anywhere in the equation to come out as y'' etc.. so diff(y(x),x$3) should generate the latex y'''(x) and so on.

Is there a trick to do this?

Maple 2017.2

 

 

Hello,

I'm trying to write and simplify expressions involving partial derivatives of an arbitrary function, say f(x,y).

Specifically, I would like diff(f(t,y),t) to evaluate to D[1](f)(t,y), instead of 
diff(f(t,y),t)

And eval(diff(f(x,y),x),x=t) gives the same result. 

Interestingly, diff(f(2*t,y),t) does evaluate to 2*D[1](f)(2*t,y), as expected.

I could get some results by using a custom differentiation function
 

`diff/f` := proc(x,y,v) 
    if v = x then return D[1](f)(v,y):
    elif v = y then return D[2](f)(x,v):
    else return 0: # is there a fallback I can use without risking infinite recursion?
    fi:
end proc:

and it works for the simple case, but now diff(f(2*t,y),t) does not work.

All this makes me feel that there must be a way to get what I want by default, but I can't figure it out.

Is there? Thank you in advance!

Hi, i have a problem with subs instruction. I'd like to change a function D(s) with symbol d/ds d(t), but i won't to calculate derivate, I want only change symbol. Thanks a lot.

I'm still quite new to maple and I'm working calculating some dynamic equations.

I want to be able to selectively group certain variables or numbers depending on how I need the equations to be showed, I don't know if that's possible, I´ll explain further.

In typewritting extended format one equation is shown like this:

 

 

And maple standard:

 

The fisrt thing I want is to show the time derivatives in the dot representation, but I also want the 1/2 multiplyting each term of the whole equation like in the maoke standard format. 

I also need to group certain variables in some other equations I have and I was wondering if there is a way to do this.

Since I am a very recent Maple user, I do not know why I obtained a wrong answer with the following two comands:

Exp:= Psi(rho(x,t),theta(x,t));
                  Psi(rho(x, t), theta(x, t))
Exp1:= diff(Exp,t);
     / d           \                                  
     |--- rho(x, t)| D[1](Psi)(rho(x, t), theta(x, t))
     \ dt          /                                  

          / d             \                                
    + |--- theta(x, t)| Psi(rho(x, t) + 1, theta(x, t))
          \ dt            /                                
 

Can someone, please, help me?

Thank you.

 

Problem.mw

Hi,

I want to know the partial derivative of

where

in order to 

ρ

If I write 

I obtain this

 

which is incorrect  since I did not have any indexes in sigma. However if I do this next command the result seems correct although no substituion of rhocrf

What I would like to obtain was the solution in order to rho and not to rhocrf and additionally having the result as a summation over p and q and not the extended result. How should I write it in Maple then? 

 

Thank you very much!

Let

z := Diff(x(t),t)*y(t) + x(t)*Diff(y(t),t);

Is there a way to tell Maple to collapse that into Diff(x(t)*y(t), t) ?

I tried factor, combine, simplify, but none of them worked.

 

 

hi .in substuting in ode equation i encounter with error

Error, (in eval/diff) invalid input: diff received (f1[i+1, i]-2*f1[i, i]+f1[i-1, i])/h^2, which is not valid for its 2nd argument

please help me

thanksh_2.5_eq4.mw
 

 

restart; with(DEtools); with(plots); interface(rtablesize = 25); ode1 := -P1*(diff(f1(x, y), x, x, x, x, x, x)+diff(f1(x, y), y, y, y, y, y, y)+3*(diff(f1(x, y), x, x, x, x, y, y))+3*(diff(f1(x, y), x, x, y, y, y, y)))+P2*(diff(f1(x, y), x, x, x, x)+diff(f1(x, y), y, y, y, y)+2*(diff(f1(x, y), x, x, y, y)))-N_x*(diff(f1(x, y), x, x))-N_y*(diff(f1(x, y), y, y)); F1xx := i, proc (j) options operator, arrow; (f1[i+1, j]-2*f1[i, j]+f1[i-1, j])/h^2 end proc; F1yy := i, proc (j) options operator, arrow; (f1[i, j+1]-2*f1[i, j]+f1[i, j-1])/hy^2 end proc; F1xxxx := i, proc (j) options operator, arrow; (f1[i+2, j]-4*f1[i+1, j]+6*f1[i, j]-4*f1[i-1, j]+f1[i-2, j])/h^4 end proc; F1yyyy := i, proc (j) options operator, arrow; (f1[i, j+2]-4*f1[i, j+1]+6*f1[i, j]-4*f1[i, j-1]+f1[i, j-2])/hy^4 end proc; F1xxxxxx := i, proc (j) options operator, arrow; (f1[i+3, j]-6*f1[i+2, j]+15*f1[i+1, j]-20*f1[i, j]+15*f1[i-1, j]-6*f1[i-2, j]+f1[i-3, j])/h^6 end proc; F1yyyyyy := i, proc (j) options operator, arrow; (f1[i, j+3]-6*f1[i, j+2]+15*f1[i, j+1]-20*f1[i, j]+15*f1[i, j-1]-6*f1[i, j-2]+f1[i, j-3])/hy^6 end proc; F1xxyyyy := i, proc (j) options operator, arrow; (f1[i-1, j-2]-4*f1[i-1, j-1]+6*f1[i-1, j]-4*f1[i-1, j+1]+f1[i-1, j+2]-2*f1[i, j-2]+8*f1[i, j-1]-12*f1[i, j]+8*f1[i, j+1]-2*f1[i, j+2]+f1[i+1, j-2]-4*f1[i+1, j-1]+6*f1[i+1, j]-4*f1[i+1, j+1]+f1[i+1, j+2])/(hy^4*h^2) end proc; F1yyxxxx := i, proc (j) options operator, arrow; (f1[i-2, j-1]-2*f1[i-2, j]+f1[i-2, j+1]-4*f1[i-1, j-1]+8*f1[i-1, j]-4*f1[i-1, j+1]+6*f1[i, j-1]-12*f1[i, j]+6*f1[i, j+1]-4*f1[i+1, j-1]+8*f1[i+1, j]-4*f1[i+1, j+1]+f1[i+2, j-1]-2*f1[i+2, j]+f1[i+2, j+1])/(h^4*hy^2) end proc; eq := simplify(eval(ode1, {diff(f1(x, y), x, x) = F1xx(i, j), diff(f1(x, y), y, y) = F1yy(i, j), diff(f1(x, y), x, x, x, x) = F1xxxx(i, j), diff(f1(x, y), y, y, y, y) = F1yyyy(i, j), diff(f1(x, y), x, x, x, x, x, x) = F1xxxxxx(i, j), diff(f1(x, y), x, x, x, x, y, y) = F1yyxxxx(i, j), diff(f1(x, y), x, x, y, y, y, y) = F1xxyyyy(i, j), diff(f1(x, y), y, y, y, y, y, y) = F1yyyyyy(i, j)}))

Error, (in eval/diff) invalid input: diff received (f1[i+1, i]-2*f1[i, i]+f1[i-1, i])/h^2, which is not valid for its 2nd argument

 

NULL

 

expand(%)

i

(1)

simplify(4*h^4*f3[i]*f4[i]*%)

4*h^4*f3[i]*f4[i]*i

(2)

diff(f1(x, y), x, x, y, y, y, y)

diff(diff(diff(diff(diff(diff(f1(x, y), x), x), y), y), y), y)

(3)

``

``

NULL


 

Download h_2.5_eq4.mw

 

Dear all:

I have used the "diff" command in Maple to help me derive a huge and very long function, and now I want to convert this huge expression from Maple to Matlab format, for example, into a Matlab .m file. The format of this expression in Maple is very different from Matlab.

So could you help me with this problem?

Thank you all.

Hello, I have a function defined as

                                                   g :=  (x, y)->diff(u1(x, y), x, x)+diff(u2(x, y), x, y). 

I want to define another function as follows

                                                           f :=  (y) ->subs(x = 0, g(x, y)) ,

Now, when I want to calculate numerical values for the new function f(0), f(0.1), f(0.2),..... and so on. The following massage appear

Error, (in f) invalid input: diff received 0, which is not valid for its 2nd argument.

What is the problem here.

Amr
 

 

 

EDIT: My question has been  answered below

 

Hello,

Lets' say I have the equation L:

 

L= 

I want to take the partial derivative of L to diff(theta2(t), t). 

Maple doesn't allow me to do this: diff(L, diff(theta2(t),t));

How can I solve this problem?

 

I hope someone can help me. Thanks in advance!

Loïc

Hi everybody;

I have a problem with Physics[diff] command. When I run the following code, error messages appear where the Physics[diff] command exist. What is the source of error? How can I fix it?

Thanks in advance

Q1.mw

I wish to define a function which is the derivative of another function.

> f:=(x)->x^2:

> g:=(x)->diff(f(x),x):

> g(x);

2 x

> f(2);

4

> g(2);
Error, (in g) invalid input: diff received 2, which is not valid for its 2nd argument

 

I cannot find a way in which I can define the function g, using the functional operator, so that I can actually evaluate g(x).

 

How can I do this?

 

#Hello people in Mapleprimes,

#After

restart;interface(typesetting=extended);

diff(f(x),x);

#shows f'(x).

#But,

diff(f(t1),t1);

#shows just df(t1)/dt1, not f'(t).

#Can't I show f'(t1) not df(t1)/dt1?

#Is this a way peculiar to Maple?

#I hope someone could give me some hints.

 

#Best wishes.

#taro

 

 

 

 

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