Note: This discussion is about an older version of the COMSOL Multiphysics^{®} software. The information provided may be out of date.

**Discussion Closed** This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

## exponential function error

Posted Mar 31, 2011, 8:09 AM EDT Version 4.0a 11 Replies

Please login with a confirmed email address before reporting spam

In global definition>funtions

I defined the function : exp(-1/(T-Tg)) , T was arguments.

At T=Tg, the exponential value should be zero but it was infinity.

can anybody help??

Please login with a confirmed email address before reporting spam

If you approach Tg from the left, i.e. is T is almost Tg but slightly less, then the function goes to +infinity (just try to solve the limit, the exponent wil go to +infinity), if you approach Tg from the right then it goes to zero (the exponent goes to -infinity) at the limit never really reaching zero.

Hello~

In global definition>funtions

I defined the function : exp(-1/(T-Tg)) , T was arguments.

At T=Tg, the exponential value should be zero but it was infinity.

can anybody help??

Please login with a confirmed email address before reporting spam

I understood your comment but, how can i treat that function to be zero?

Is there any limit operator in comsol?

Please login with a confirmed email address before reporting spam

but the answer was infinity...

Please login with a confirmed email address before reporting spam

The value becomes 0 or infinity depending on from which side you approach it. You are probably plotting a range that includes values on both sides of Tg.

Plotting exp(-1/(5-x)), for example, from 0 to 5, shows that the value approaches 0 "from the left." Plotting this function from 0 to 10, for example, means that you pass the singularity at 5, and an infinite value (or rather numerically very large number) makes the plot appear irregular.

Best regards,

Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

you might consider a step-by-step definition to avoid the singularity:

f(T) = 0 for abs(T-Tg) < some very small value

Regards

Edgar

Please login with a confirmed email address before reporting spam

Nagi Elabbasi

Veryst Engineering

Please login with a confirmed email address before reporting spam

I've solved that problem.

Please login with a confirmed email address before reporting spam

a usefull "epsilon" or small value is the paameter (internal to COMSOL of "eps", smallest step value you might distinguish from "1" in the used binary numerical representation

--

Good luck

Ivar

Please login with a confirmed email address before reporting spam

Plotting your exponential function in exp(-1/(5-x)), for example, from 0 to 5, shows that the value approaches 0 "from the left." Plotting this function from 0 to 10 put in to values let - x=0,1,2,3,,,,and shown for more solving equation u can got help with the site here's the link

math.tutorvista.com/calculus/graphing-exponential-functions.html

Please login with a confirmed email address before reporting spam

So, our Pre-calc teacher thinks we are geniouses since we are in a pre calc class-__- so she never really explains us stuff.and doesnt teach the way book teaches.but im scared to come up to her because she's a freaking Gorgon and we got like 14 people left in this class cause they all switched out...anyways.. So here's the problem i cant figure out. You gotta use this exponential formula: y=Pe^rt (to the 'rt' power) .

The word problem: Radium-221 has a half-life of 30 sec. How long will it take for 95% of a sample to decay?

Could anyone please just explain what to put where? would you convert 95% into decimal and use is as P?

Thank you!!

NICK

Please login with a confirmed email address before reporting spam

looks like you have to find a value for the radium decay constant...

I wouldn't convert 95% into decimals and use it as P...

isolate t...

Note that while COMSOL employees may participate in the discussion forum, COMSOL^{®} software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.