## 440 Reputation

13 years, 291 days

## QUESTION SOLVED...

Hello,

With the help of Maplesoft support, i could solve the problem.

The problem was due to my notation "[ ]" whiçh was use for the subscripts.

This problem should be solved in the last version of Maple.

Here you can find a code which is working where the notation "[ ]" has been replaced by "__"

TestExplore_4.mw

## Here the result that I was looking for :...

Here the result that I was looking for :

g:=x->piecewise(seq(op([x>=n*2 and x <= (n+1)*2, f(x-n*2)]),n=0..4))

In fact, it is enough for me.

If i have a function defined on [0,T], i was looking for extending just for [0,nT]. Extending  the function for [a,b] with a et b not multiple of T was not necessary for me.

## In fact, I would like to use a second pi...

In fact, I would like to use a second piecewise function.

I would like to program with this kind of method :

piecewise(seq(op([x>-7+2*n and x<-7+2*(n+1), exp(-x-6+2*n)]), n=0..7)):

Extracted from a previous post :

http://www.mapleprimes.com/questions/202155-Periodic-Piecewise-peicemeal-Function

However, I have difficulties for defining the second function. It may be due to the define of the period.

I would be interested if you can bring me a general method that you adapt for various periodic function.

## It seems that it is preferable to let al...

It seems that it is preferable to let all the dimensions in mm.

## @Carl Love Hello, I have the same issue ...

@Carl Love

Hello, I have the same issue

In a constraint equation (in mechanics), I need to make these algebraic substitutions :

--> sqrt(xA1² + yA1²) =rF1
--> arctan(abs(yA1)/abs(xA1)) = aF1
--> sqrt(xC1^2+yC1^2) = rBTP
--> arctan(abs(yC1)/abs(xC1))=a1

I try to do it with this code :

ListAlgsubs:={sqrt(xA1^2+yA1^2)=rF1,sqrt(xA2^2+yA2^2)=rF2,sqrt(xA3^2+yA3^2)=rF3, sqrt(xA4^2+yA4^2)=rF4,arctan(abs(yA1)/abs(xA1))=aF1,-arctan(abs(yA2)/abs(xA2))=aF2,pi+arctan(abs(yA3)/abs(xA3))=aF3,pi-arctan(abs(yA4)/abs(xA4))=aF4,sqrt(xC1^2+yC1^2)=rBTP,arctan(abs(yC1)/abs(xC1))=a1};
for i from 1 to nops(ListAlgsubs)
do Branch1Cons:=applyrule(op(i,ListAlgsubs),Branch1Cons)
end do:
Branch1Cons:= simplify(Branch1Cons);

I have tried with algsubs or applyrule but it wasn't successfull in both cases.

Do you have an idea how can I do to simplify my expressions ? and namely conduct a good use of applyrule function

I join an extract of my code in order to facilitate the troubleshooting.

example.mw

## Thank you for your help. Here the code i...

Here the code i compile :

restart;
local gamma;
sol := convert(a*cos(gamma)+b*sin(gamma)+c, phaseamp, gamma);
solve(%=0,gamma);

I find this :

arctan(b, a)+Pi-arccos(c/sqrt(a^2+b^2))

So i find only one solution and i would have linked to find 2 solutions :

gamma=-arctan(b, a) + arccos(c/sqrt(a²+b²))

and gamma=-arctan(b, a) - arccos(c/sqrt(a²+b²))

Have you some ideas why i don't find 2 solutions ?

I hope my question is clearer.

Thanks a lot for your help

## 1) about document mode I am probably mi...

I am probably missing something here since I am not very familiar with document mode, but I fail to see how using document mode helps your situation. How does it make the worksheet shorter?

OK, in fact, i am not very familiar with this mode too but i imagine (i may be wrong) that the purpose of this mode is to facilite maple presentation and its goal is namely to better present the results.

2) code regions

What I would do is place the less relevant sections of code in Code Edit Regions.

I have tried code edit regions but i didn't manage to use well i think. What to use choose to put in these code regions ? Is it the maple Input? Because when i copy/ paste my maple input + text in these code regions, it seems that all my comments in text format dispear.

Do you have a example of the use on the code regions to facilitate the presentation of maple worksheet ?

## OK thank you for your remarks. So, the 3...

OK thank you for your remarks.

So, the 3 main solutions i imagine :

1) Transform a worksheet in a document.

But, is it possible to transform a worksheet in document ? It could help me to improve the presentation of my results.

2) Export my maple worksheet in a RTF format. I have seen that the document takes less room than in a pdf. The inconvenient of this solution is that you can not modify the equations.

3) Export my maple worksheet in a tex file and after use the software GrindEQ™ Math Utilities V6.0 so as to transform the tex file in a document word with mathtype equations that i can improve.

Do you have ideas for my remaining question about the point 1 ? and suggestions concerning the other possible solutions ?

## next relations...

I believe i don't understand your tip to to express

psi[1](t) in function of alpha(t), beta(t) and z(t).

and phi[1](t) in function of alpha(t), beta(t) and z(t).

Normally it should be easier than the previous calculation of gamma[1](t).

To do that, i need  to use the three first equations in my program eq_liaison[1, 1],eq_liaison[1, 2],eq_liaison[1, 3].

I have some difficulties to find how i can use these equations (and namely in which order).

Here my last program:

constraints_5.mw

Have you some ideas about the manipulation to do to obtain :

psi[1](t) in function of alpha(t), beta(t) and z(t).

and phi[1](t) in function of alpha(t), beta(t) and z(t) ?

The difficulty is the fact i need to have psi[1](t) in function of alpha(t), beta(t) and z(t) without any gamma[1](t) ?

Thank you for help

## I'm may be wrong but i don't think that ...

I'm may be wrong but i don't think that is so simple.

Indeed, for psi[1](t) for example, i need to isolate it and after i need to express

psi[1](t) in function of alpha(t), beta(t) and z(t).

but the dependency of gamma|1](t) and phi[1](t) must be suppressed.

For  gamma|1](t), that is ok because thanks to your help i could express gamma[1](t) in fonction of alpha(t), beta(t) and z(t).

But it remains to express phi[1](t) in function of alpha(t), beta(t) and z(t).

I hope you will understand what i need.

Don't hesitate to ask me to precise a point.

## It works !!!...

Infact, i needed to use coeff function with a expression and not an equation !!! Thank you.

Another point, now i need to express

psi[1](t) in function of alpha(t), beta(t) and z(t).

and phi[1](t) in function of alpha(t), beta(t) and z(t).

Normally it should be easier than the previous calculation of gamma[1](t).

To do that, i need  to use the three first equations in my program eq_liaison[1, 1],eq_liaison[1, 2],eq_liaison[1, 3].

I have some difficulties to find how i can use these equations (and namely in which order).

Here my last program:

constraints_5.mw

Have you some ideas about the manipulation to do to obtain :

psi[1](t) in function of alpha(t), beta(t) and z(t).

and phi[1](t) in function of alpha(t), beta(t) and z(t) ?

## ...

Here my last file.

calcul_des_matrices_.mw

## ...

Thank you for help.

In fact the first answer you gave is good ( Preben Alsholm 5415).

## Thank you for help. I perfectly understa...

Thank you for help. I perfectly understand my need.

However, i still don't manage to do the manipulation.

I click on the parameters menu. I replace the numeric value by a symbol m1 for the mass 1 as you can see below.

However, when i launch the analysis template, i have an error message (as you can see below). It seems the parameters of the masses are not well defined yet. Can you precise me how you define the parameters in the parameter window ? may be my mistake comes from this.

Thanks a lot for your help.

## Hello,I'm looking forward to having some...

Hello,

I'm looking forward to having some help !!!
In fact, i don't manage to see the parameters in the section "Parameter and Variable Manipulation (optional)". So, i can't select of not symbolic or numeric.

On some model, i can see some parameters but not all the parameters like the different masses parameters of the slider crank

What can i do to be able to see the parameters ? Should i define them somewhere ?

Thank you for help!

 1 2 Page 1 of 2
﻿