# Constructing a function

1. Aug 27, 2009

### redtree

THIS IS NOT A HOMEWORK QUESTION, BUT I AM POSTING HERE ANYWAY.

Given the equation

y = sqrt(x)

I'm trying to construct a function that instead of being imaginary when x<0, gives a value for y which is real and negative but whose magnitude is still sqrt(x).

I've been going around in circles trying to model the function. I know there has to be a simple answer, but I'm not finding it.

2. Aug 27, 2009

### rock.freak667

y2= -x or y=-√-x

but I am not good at modeling functions

3. Aug 27, 2009

### redtree

I'd like the function to give positive real values for y when x>0 whose magnitude is sqrt(x).

4. Aug 27, 2009

### slider142

You've already well-defined the function (we know its value for each input). If you want to furthermore put it into x and y symbols, simply define it explicitly. Ie.,
$$f(x) = \left\lbrace\begin{array}{ll}\sqrt{x}, & x\geq 0\\ -\sqrt{-x}, & x < 0\end{array}$$
is a well-defined function.
If you don't like explicitly branched functions, make use of pre-defined branched functions:
$$f(x) = \operatorname{sgn}(x)\sqrt{|x|}$$
is the same function.

5. Aug 27, 2009

### redtree

That I know how to do. I'm looking for a continuous function without absolute values and sign functions.

6. Aug 27, 2009

### VietDao29

Don't you see there's an obvious contradiction in your initial post, and last post?

And btw, we here do not solve homework, or whatever problems given to you!! That's your task, not ours!!! We are not paid a single penny for it!!! :grumpy:

We only give guide to ones who are stuck, and really seeking for help; not for ones that command us to solve the problem for them. Be more polite, and we'll be the same to you.

Now, show your work!!! What have you tried, and how far did you get?!

7. Aug 27, 2009

### redtree

First of all, this is not homework.

Second of all, there are any number of discontinuous solutions and any number of solutions that utilize sign and absolute value functions. I apologize that I didn't note in my original post that those are not solutions that I am looking for.

Other examples of solutions:

y = sgn(x)*sqrt(e)^ln(abs(x))
y = for x >= 0, sqrt(e)^ln(x), for x<0, sqrt(e)^ln(-x)

Etc.

The point is that I'm trying to avoid these types of solutions.

Sorry if that seems "grumpy."

8. Aug 27, 2009

### redtree

Another solution that I am trying to avoid is a complex number where the real portion gives the result I want. There are also lots of versions of solutions based on complex numbers.

Example:

y = sqrt(x) * (1+i)

9. Aug 27, 2009

### redtree

Another solution (that I also want to avoid):

y = sqrt(x) * (1+i) - abs(sqrt(x))*i

10. Aug 27, 2009

### redtree

My feeling is that the answer lies with versions of the trigonometric functions, such as arctan, but I haven't been able to derive the solution.

11. Aug 28, 2009

### Elucidus

Any function that gives a negative value whose magnitude is sqrt|x| for a negative argument has to be equivalent to $-\sqrt{(-x)}$ for x < 0. I am sorry to inform you, you cannot find such a function that avoids the things you are trying to avoid. Slider142 has given two valid answers. Any others will be equivalent to these.

Another is

$$f(x)=\left\{\begin{array}{rl} \frac{x \sqrt{|x|}}{|x|} & x \neq 0 \\ 0 & x = 0 \end{array}$$

12. Aug 28, 2009

### Bohrok

What about something like $$\sqrt[4]{x^2}$$?

13. Aug 28, 2009

### Elucidus

I came up with something similar earlier today. The problem is with definition at 0. Using a piecewise discontinuity removal:

$$f(x) = \left\{ \begin{array}{rl} \frac{x}{\sqrt[4]{x^2}} & x \neq 0 \\ 0 & x = 0 \end{array}$$

This avoids as much as possible the use of absolute value and signum, but it remains a piecewise defined function.

--Elucidus

Last edited: Aug 28, 2009
14. Aug 29, 2009

### Bohrok

redtree,
Do you want a function that looks exactly like sqrt(x) or something else?